mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Mann (JIRA)" <>
Subject [jira] [Created] (MESOS-7629) Parsing to protobuf leads to API call validation errors
Date Tue, 06 Jun 2017 15:23:18 GMT
Greg Mann created MESOS-7629:

             Summary: Parsing to protobuf leads to API call validation errors
                 Key: MESOS-7629
             Project: Mesos
          Issue Type: Bug
          Components: stout
            Reporter: Greg Mann

The {{::protobuf::parse()}} function will [silently drop unrecognized fields|],
which makes sense in the context of maintaining backward-compatibility across different Mesos
versions which may add or remove fields from protobuf messages. However, since we [rely on
this protobuf parsing|]
in some places for validation of user-supplied JSON, this can lead to API endpoints returning
successful 2XX responses, when in fact the JSON was malformed and the call has not been completed
as submitted.

We should consider adding a parameter to API calls which allows users to enable/disable ignoring
unrecognized fields in the call. If the default behavior for JSON requests was to return an
error rather than ignore unrecognized fields, then our parsing code would catch malformed
JSON submissions. The user could opt-in to the "ignore unrecognized fields" behavior when
backwards compatibility is a concern.

This message was sent by Atlassian JIRA

View raw message