fix: apply dynamodb gsi changes one index per stack update - #926
Merged
Conversation
feat: release v1.5
Co-authored-by: Cursor <cursoragent@cursor.com>
Intermediate waves now patch currently deployed templates instead of cdk deploying app code, include nested-stack tables, and share deploy-env/CFN helpers. Tests cover the wave loop, restore-on-failure path, and nested template discovery. GitHub OIDC session duration is 2 hours so multi-wave CI does not expire mid-rollout. Co-authored-by: Cursor <cursoragent@cursor.com>
diegomayorga-dept
approved these changes
Aug 28, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix: apply DynamoDB GSI changes one index per stack update
Type of Change*
Summary
stagingfailed because CloudFormation tried to add two GSIs (PollStatus_IndexandWorkflowExternalId_Index) to the existinglaboratory-run-tablein one update. DynamoDB allows only one GSI create or delete perUpdateTable.pnpm run deploynow runsdeploy-dynamodb-gsi-wavesbefore the finalcdk deploy. If an existing table would change more than one GSI, it applies those indexes one CloudFormation update at a time, then the normal deploy lands the last remaining index.CreateTablemay define many GSIs).Deploy
You only start one
pnpm build-and-deployor one CI job. That job may run two sequential CloudFormation updates internally (one GSI per update). You do not need to re-trigger CI.The job will take longer because each GSI must become
ACTIVEbefore the next update. If GitHub OIDC hits the 1-hour role limit during backfill, bumprole-duration-seconds.Testing*
stagingand letcicd-release-quality-uatrun onceadd PollStatus_Index) then the final deploy addingWorkflowExternalId_Indexlaboratory-run-tableends with both new indexesACTIVElaboratory-s3-access-table,laboratory-data-tagging-table,workflow-run-preset-table) still create successfullydevelopmentas well so quality/prod pick up the same guardImpact
ACTIVEbefore the next update. Later deploys that do not change GSIs are unchanged.CreateTable.Additional Information
UpdateTablelimit, not a bug in our table schema. CloudFormation cannot add two GSIs in a single stack update on an existing table.UPDATE_ROLLBACK_COMPLETE; the next deploy can proceed.role-duration-secondsis currently 3600. If GSI backfill is slow, that session may expire mid-job and will need a bump.developmentso quality/prod get the same guard for future multi-GSI merges.Checklist*