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

fix(parser): add aws region to kinesis event #3260

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

am29d
Copy link
Contributor

@am29d am29d commented Oct 25, 2024

Summary

This PR adds missing awsRegion in the KinesisDataStreamRecord schema. I have checked the python version and it is there, so we somehow missed it during implementation. To avoid these cases in the future, I have added a small helper function and tests to make our schemas strict for the test run. This will allow us to find cases where the test event contains properties that we did not include in the schema.

Changes

Please provide a summary of what's being changed

  • add helper function to make the provided schema strict with some of the cases for union, arrays, records. There are probably more cases but I did not wanted to implement all spectrum, only what we need right now.
  • add tests to verify that there are no properties missing in the schema that are included in the test event

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: closes #3227 closes #3261


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.

@am29d am29d requested review from a team as code owners October 25, 2024 20:50
@boring-cyborg boring-cyborg bot added the parser This item relates to the Parser Utility label Oct 25, 2024
@pull-request-size pull-request-size bot added the size/XS PR between 0-9 LOC label Oct 25, 2024
@am29d am29d changed the title add aws region to kinesis event fix(parser): add aws region to kinesis event Oct 25, 2024
@github-actions github-actions bot added the bug Something isn't working label Oct 25, 2024
@boring-cyborg boring-cyborg bot added the tests PRs that add or change tests label Oct 25, 2024
@pull-request-size pull-request-size bot added size/L PRs between 100-499 LOC and removed size/XS PR between 0-9 LOC labels Oct 25, 2024
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

I have left a comment on the introduction of .strict() as I have some concerns on it - but I'm more than open to discuss.

packages/parser/tests/unit/schema/kinesis.test.ts Outdated Show resolved Hide resolved
Copy link

Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thank you for the fix, and for addressing the comments during the review.

@dreamorosi dreamorosi merged commit 246f132 into main Oct 28, 2024
22 checks passed
@dreamorosi dreamorosi deleted the 3227/add-awsregion-to-kinesis-event branch October 28, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser This item relates to the Parser Utility size/L PRs between 100-499 LOC tests PRs that add or change tests
Projects
None yet
2 participants