Skip to content

fix(parser): loose validation on SNS fields to support FIFO #1606

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

Merged

Conversation

heitorlessa
Copy link
Contributor

@heitorlessa heitorlessa commented Oct 14, 2022

Issue number: #1590

Summary

Changes

Please provide a summary of what's being changed

When enabling FIFO in SNS topics, SNS removes the following three keys leading to a ValidationError in Parser.

Error

SigningCertUrl
  none is not an allowed value (type=type_error.none.not_allowed)
Signature
  field required (type=value_error.missing)
SignatureVersion
  field required (type=value_error.missing)

This PR makes two changes:

  • Marks all of these fields as Optional. In the future, we should look into having explicit FIFO Models to make strict typing better
  • Removes test_handle_sns_sqs_trigger_event_json_body_missing_signing_cert_url that verified the field being tampered.. which is no longer valid due to FIFO behaviour completely removing this and other fields above

User experience

Please share what the user experience looks like before and after this change

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@heitorlessa heitorlessa requested a review from a team as a code owner October 14, 2022 14:10
@heitorlessa heitorlessa requested review from am29d and removed request for a team October 14, 2022 14:10
@boring-cyborg boring-cyborg bot added the tests label Oct 14, 2022
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 14, 2022
@heitorlessa heitorlessa requested review from leandrodamascena and removed request for am29d October 14, 2022 14:10
@github-actions github-actions bot added the bug Something isn't working label Oct 14, 2022
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants