Skip to content

fix(parser): EventBridge envelope uses correct path #3504

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
merged 2 commits into from
Jan 21, 2025

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR fixes the issue described in the linked issue by making it so that the EventBridgeEnvelope throws an error that includes the correct path to the issue. This will allow customers to more quickly identify the validation/parsing issue.

To implement the change, and since we are not doing any special transform or handling of the payload in the detail field, I also refactored the envelope implementation so that the schema provided by the customer to validate the payload is used to extend the base EventBridgeSchema event. This simplifies the implementation and lets Zod do the heavy lifting.

While working on this PR I also removed some unused test events that were leftover from previous refactors.

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

Issue number: #3503


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.

@dreamorosi dreamorosi requested a review from a team January 20, 2025 15:57
@dreamorosi dreamorosi requested a review from a team as a code owner January 20, 2025 15:57
@dreamorosi dreamorosi self-assigned this Jan 20, 2025
@boring-cyborg boring-cyborg bot added parser This item relates to the Parser Utility tests PRs that add or change tests labels Jan 20, 2025
@pull-request-size pull-request-size bot added the size/XXL PRs with 1K+ LOC, largely documentation related label Jan 20, 2025
@dreamorosi dreamorosi linked an issue Jan 20, 2025 that may be closed by this pull request
@github-actions github-actions bot added the bug Something isn't working label Jan 20, 2025
@dreamorosi dreamorosi requested a review from am29d January 21, 2025 09:57
Copy link
Contributor

@am29d am29d left a comment

Choose a reason for hiding this comment

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

This looks clean, I like it! Buckel up abstract Envelope, we probably going to remove you entirely.

@am29d am29d merged commit 7cce60b into main Jan 21, 2025
38 checks passed
@am29d am29d deleted the fix/eventbridge_envelope branch January 21, 2025 11:01
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/XXL PRs with 1K+ LOC, largely documentation related tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: EventBridge envelope reports incorrect path
2 participants