Skip to content

Commit 9911e4c

Browse files
rajbosCopilot
andcommitted
fix: add concurrency control to sharing-server deploy workflow
Prevent concurrent Terraform runs from conflicting on the same Azure Blob Storage state file. Without concurrency serialization, two pushes to the same branch can trigger simultaneous deploy jobs that both try to acquire the same state lock, causing 'state blob is already locked' failures. - For branch pushes (testing): cancel-in-progress so new commits don't wait behind stale deploys. - For main (production): queue (cancel-in-progress=false) so production deploys always complete rather than being cancelled mid-apply. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2a773a7 commit 9911e4c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/sharing-server-deploy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
- ".github/workflows/sharing-server-deploy.yml"
1212
workflow_dispatch:
1313

14+
# One deploy per branch at a time — prevents concurrent Terraform runs from
15+
# conflicting on the same remote state file (state blob already locked errors).
16+
# Cancel in-progress for branch pushes so stale deploys don't block newer ones;
17+
# queue (no cancel) for main so production deploys always complete.
18+
concurrency:
19+
group: sharing-server-deploy-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
1422
# Minimal baseline; jobs declare only what they need.
1523
permissions:
1624
contents: read

0 commit comments

Comments
 (0)