Skip to content

Serialize Lambda deploys per environment - #339

Merged
wasimxyz merged 1 commit into
stagingfrom
ci/serialize-lambda-deploys
Oct 25, 2026
Merged

wasimxyz merged 1 commit into
stagingfrom
ci/serialize-lambda-deploys

Conversation

@wasimxyz

Copy link
Copy Markdown
Member

Adds a per-branch concurrency group to deploy-lambda.yml, so two Lambda deploys to the same environment run one after the other instead of at the same time.

Why

Two merges to staging landed 21 seconds apart: #337 and #336. Each one started a deploy. The second deploy reached sam deploy while the first was still updating the staging CloudFormation stack, so CloudFormation rejected it with an UPDATE_IN_PROGRESS error.

Staging is running the image from #337. The change in #336 only updates virtualenv, a dev-only tool that the Lambda image does not install, so staging runs the same code either way.

Changes

  • .github/workflows/deploy-lambda.yml: adds concurrency with the group deploy-lambda-<branch> and cancel-in-progress: false. A second deploy waits for the first.
  • docs/developer/ci-and-deployment.md: adds one sentence about the queueing in the Lambda deploy section.

Cancellation stays off on purpose. Cancelling a job does not stop its CloudFormation update, so the next run would fail the same way. If a third merge arrives while one run is waiting, GitHub cancels the waiting run and keeps the newest one. The newest commit includes all earlier changes.

Testing

  • make check passes.
  • make sam-check-overrides: the workflow check passes. The other check in the same command fails on a Mac with a local Xcode tools error, unrelated to this change.
  • This is a CI-only change, so it has no changelog entry. No API, MCP, watcher, or docs-site pages changed, so no snapshots were regenerated.

Once this merges, the workflow runs on the new staging commit. A deploy that overlaps another one should show as queued.

Two merges to staging could start two deploy-lambda runs at once. CloudFormation accepts one update per stack at a time, so the second run failed at the sam deploy step with an UPDATE_IN_PROGRESS error.

Add a per-branch concurrency group to the workflow. A second deploy now waits for the first to finish. Cancellation is off, because cancelling a job does not stop its CloudFormation update, so the next run would hit the same error.

Also add one sentence about the queueing to the Lambda deployment section of the CI docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
data-hub Ready Ready Preview Oct 25, 2026 12:49am UTC
data-hub-docs Ready Ready Preview Oct 25, 2026 12:49am UTC

Request Review

@wasimxyz wasimxyz self-assigned this Oct 25, 2026
@wasimxyz
wasimxyz merged commit d6b6c81 into staging Oct 25, 2026
5 of 6 checks passed
@wasimxyz
wasimxyz deleted the ci/serialize-lambda-deploys branch October 25, 2026 00:57

This branch was successfully deployed

2 active deployments
Preview – data-hub — f635f365 Deployed Oct 25, 2026 by vercel[bot]
Preview – data-hub-docs — f635f365 Deployed Oct 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant