-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Apigw/add support for response override in request #12628
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
Apigw/add support for response override in request #12628
Conversation
LocalStack Community integration with Pro 2 files 2 suites 19m 8s ⏱️ Results for commit 38d05a2. ♻️ This comment has been updated with latest results. |
… parser to prevent if block everywhere
@@ -159,6 +159,7 @@ def create_test_invocation_context( | |||
requestOverride=ContextVarsRequestOverride(header={}, path={}, querystring={}), | |||
responseOverride=ContextVarsResponseOverride(header={}, status=0), | |||
) | |||
invocation_context.trace_id = parse_handler.populate_trace_id({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 ??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it had been deleted in the previous commit, I've just added it back 😄 bb5dbe1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This looks good, quite a really weird case by AWS 👀
It's also funny that we can add user-defined fields to the responseOverride
, acting like a context stash for user-defined values...
That must have been a fun one 😄 thanks for added parity and jumping on this! 🚀
@@ -159,6 +159,7 @@ def create_test_invocation_context( | |||
requestOverride=ContextVarsRequestOverride(header={}, path={}, querystring={}), | |||
responseOverride=ContextVarsResponseOverride(header={}, status=0), | |||
) | |||
invocation_context.trace_id = parse_handler.populate_trace_id({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it had been deleted in the previous commit, I've just added it back 😄 bb5dbe1
Motivation
This is a partial solve for #12621.
This pr will allow to use
responseOverride
in a request template and have it's value passed to the context of the response template and possibly affecting the response.There are 2 issues described by the user. I will work on the VTL template update in a follow up.
Changes