This repository was archived by the owner on Mar 23, 2026. It is now read-only.
Update deployment stage_name when creating API Gateway stages to fix parity issues#9095
Merged
Conversation
calvernaz
reviewed
Sep 7, 2023
Contributor
calvernaz
left a comment
There was a problem hiding this comment.
Thanks for doing this, I do notice situations where I had to apply twice to get the expected result, maybe this will fix it.
I just left a comment regarding the removal of the description field.
bentsku
approved these changes
Sep 8, 2023
Contributor
bentsku
left a comment
There was a problem hiding this comment.
LGTM! Great catch! Love to see all those nice parity upgrade for API Gateway, thanks a lot!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Addresses a user issue reported in Slack. We are currently seeing parity issues in the linkage between API Gateway stages and deployments. In a nutshell, we need to establish a bidirectional link
stage<>deploymentfor thecreate_stage(..)API. Moto was currently only adding thestage->deployment, but the reverse direction was still missing, leading to deployment errors, e.g., with Terraform.Changes
create_stage(..)to update thestage_nameon the Deployment on creation of a Stageget_stages(..)to transform the result entriesDISABLE_BOTO_RETRIES(API Gateway snapshot tests require retries, due to high frequency ofTooManyRequestsException)