Skip to content
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
whummer merged 3 commits into
masterfrom
apigw-deploy-stage
Sep 8, 2023
Merged

Update deployment stage_name when creating API Gateway stages to fix parity issues#9095
whummer merged 3 commits into
masterfrom
apigw-deploy-stage

Conversation

@whummer
Copy link
Copy Markdown
Member

@whummer whummer commented Sep 7, 2023

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<>deployment for the create_stage(..) API. Moto was currently only adding the stage->deployment, but the reverse direction was still missing, leading to deployment errors, e.g., with Terraform.

Changes

  • update create_stage(..) to update the stage_name on the Deployment on creation of a Stage
  • add small fix in get_stages(..) to transform the result entries
  • add Makefile parametrization for DISABLE_BOTO_RETRIES (API Gateway snapshot tests require retries, due to high frequency of TooManyRequestsException)
  • add a snapshot test to cover a sequence of different creations/deletions of stages&deployments

@whummer whummer requested a review from calvernaz as a code owner September 7, 2023 17:35
@whummer whummer changed the title update deployment stage_name when creating API Gateway stages Update deployment stage_name when creating API Gateway stages to fix TF errors Sep 7, 2023
@whummer whummer changed the title Update deployment stage_name when creating API Gateway stages to fix TF errors Update deployment stage_name when creating API Gateway stages to fix parity issues Sep 7, 2023
@whummer whummer requested a review from bentsku September 7, 2023 17:36
@whummer whummer added the semver: patch Non-breaking changes which can be included in patch releases label Sep 7, 2023
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 7, 2023

LocalStack Community integration with Pro

       2 files         2 suites   1h 20m 54s ⏱️
2 171 tests 1 673 ✔️ 498 💤 0
2 172 runs  1 673 ✔️ 499 💤 0

Results for commit 9fc447b.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@calvernaz calvernaz 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 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.

Comment thread localstack/services/apigateway/provider.py Outdated
@whummer whummer requested a review from calvernaz September 7, 2023 21:21
Copy link
Copy Markdown
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

LGTM! Great catch! Love to see all those nice parity upgrade for API Gateway, thanks a lot!

@whummer whummer merged commit 7328753 into master Sep 8, 2023
@whummer whummer deleted the apigw-deploy-stage branch September 8, 2023 07:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver: patch Non-breaking changes which can be included in patch releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants