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): handle API Gateway Test UI sourceIp #2531

Merged
merged 2 commits into from
May 20, 2024

Conversation

dreamorosi
Copy link
Contributor

Summary

Changes

Please provide a summary of what's being changed

This PR updates the APIGatewayProxyEvent schema in the Parser utility to account for an edge case occurring when using the API Gateway Test UI to call an endpoint.

In these cases API Gateway doesn't send a real sourceIp but instead sends a string hardcoded to test-invoke-source-ip. This caused the schema to fail parsing preventing customers from using the Test UI with endpoints using the Parser utility.

Normally we wouldn't have made changes of this type, but since previous efforts to have the API Gateway service change this behavior have failed, and there's no workaround for customers, we are making an exception until the situation improves.

As of this PR the sourceIp field can be either a valid IP address or a string with value test-invoke-source-ip.

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

Issue number: #2526


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 May 15, 2024
@dreamorosi dreamorosi requested review from a team as code owners May 15, 2024 15:54
@boring-cyborg boring-cyborg bot added parser This item relates to the Parser Utility tests PRs that add or change tests labels May 15, 2024
@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label May 15, 2024
@github-actions github-actions bot added the bug Something isn't working label May 15, 2024
@dreamorosi dreamorosi requested a review from am29d May 15, 2024 17:09
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.

Thanks for adding this edge case, this is definitely save troubles for future UI users!

Copy link

sonarcloud bot commented May 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dreamorosi dreamorosi merged commit cd6c512 into main May 20, 2024
13 checks passed
@dreamorosi dreamorosi deleted the 2526-bug-api-gateway-testui-sourceip branch May 20, 2024 14:08
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/M PR between 30-99 LOC tests PRs that add or change tests
Projects
None yet
2 participants