Skip to content

fix(parser): allow VPC envelopes to handle non-JSON strings #3534

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 3 commits into from
Jan 27, 2025

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR updates the implementation of both the VPC Lattice v1 & v2 envelopes so that they don't try transform the body of the request as JSON without the customer explicitly passing a schema that does so.

This allows customers to handle plain text or base64-encoded as well.

In this PR I also removed the @anatine/zod-mock dependency, moved the packages/parser/tests/schemas/util.js file to its own folder at packages/parser/tests/helpers/util.js, and removed the Envelope implementation since this was the last set of built-in envelopes using it. These three changes account for 90% of the diff.

Also with this PR we should be done with the major refactoring of the Parser envelopes. There are still a few things we should address like improving the docstrings of some envelopes/schemas, improving the docs of the utility, and creating sub-path exports for each set of envelopes like we did for the built-in schemas - but we'll do this in the next releases.

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

Issue number: fixes #3533


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 self-assigned this Jan 27, 2025
@dreamorosi dreamorosi requested a review from a team January 27, 2025 09:15
@dreamorosi dreamorosi requested a review from a team as a code owner January 27, 2025 09:15
@boring-cyborg boring-cyborg bot added dependencies Changes that touch dependencies, e.g. Dependabot, etc. parser This item relates to the Parser Utility tests PRs that add or change tests labels Jan 27, 2025
@pull-request-size pull-request-size bot added the size/XL PRs between 500-999 LOC, often PRs that grown with feedback label Jan 27, 2025
@dreamorosi dreamorosi requested a review from am29d January 27, 2025 09:16
@github-actions github-actions bot added the bug Something isn't working label Jan 27, 2025
@dreamorosi dreamorosi requested a review from am29d January 27, 2025 09:27
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.

Well done, thanks a lot for the moving the bug bash forward so quickly!

@am29d am29d merged commit 603988d into main Jan 27, 2025
38 checks passed
@am29d am29d deleted the fix/vpc-lattice-envelopes branch January 27, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Changes that touch dependencies, e.g. Dependabot, etc. parser This item relates to the Parser Utility size/XL PRs between 500-999 LOC, often PRs that grown with feedback tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: VPC Lattice envelopes assume data is always a JSON
2 participants