Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate-gateway: make unknown data cause an error #842

Closed

Conversation

srenatus
Copy link
Contributor

Before, if you (for example) POST

{ "foo": "bar", "baz": 300 }

where the protobuf message this is to be converted into only has a field

string foo = 1;

this would silently be ignored.

Now, it's an error:

{
  "error": "unknown field \"bar\" in request.CreateProjectReq",
  "message": "unknown field \"bar\" in request.CreateProjectReq",
  "code": 3,
  "details": []
}

@srenatus srenatus added automate-gateway tech debt This issue addresses tech debt in our code base labels Jul 10, 2019
@srenatus srenatus requested a review from a team as a code owner July 10, 2019 09:33
@srenatus srenatus self-assigned this Jul 10, 2019
@srenatus srenatus force-pushed the sr/automate-gateway/unknown-data-is-an-error-now branch 2 times, most recently from 6fce58a to 2086804 Compare July 10, 2019 11:04
@srenatus srenatus added the WIP label Jul 10, 2019
@srenatus
Copy link
Contributor Author

Turns out this affects a few of our inspec tests... might continue looking into this later...

Before, if you (for example) POST

    { "foo": "bar", "baz": 300 }

where the protobuf message this is to be converted into only has a field

    string foo = 1;

this would silently be ignored.

Now, it's an error:

    {
      "error": "unknown field \"bar\" in request.CreateProjectReq",
      "message": "unknown field \"bar\" in request.CreateProjectReq",
      "code": 3,
      "details": []
    }

Signed-off-by: Stephan Renatus <srenatus@chef.io>
It's never been a thing -- and now automate-gateway will complain.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
Signed-off-by: Stephan Renatus <srenatus@chef.io>
Signed-off-by: Stephan Renatus <srenatus@chef.io>
@srenatus srenatus force-pushed the sr/automate-gateway/unknown-data-is-an-error-now branch from 2086804 to 73f162d Compare July 11, 2019 13:37
…serReq

Signed-off-by: Stephan Renatus <srenatus@chef.io>
Signed-off-by: Stephan Renatus <srenatus@chef.io>
Signed-off-by: Stephan Renatus <srenatus@chef.io>
@srenatus srenatus force-pushed the sr/automate-gateway/unknown-data-is-an-error-now branch from 18575e2 to 47afce7 Compare July 11, 2019 15:24
Signed-off-by: Stephan Renatus <srenatus@chef.io>
Signed-off-by: Stephan Renatus <srenatus@chef.io>
@srenatus srenatus added the auth-team anything that needs to be on the auth team board label Jul 16, 2019
@srenatus
Copy link
Contributor Author

To be discussed, reopened, eventually. I'll make a tech debt card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth-team anything that needs to be on the auth team board automate-gateway tech debt This issue addresses tech debt in our code base WIP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant