ci(cloud-deploy): per-env deploy-job concurrency so prod deploys can't be cancelled mid-flight (#11640) - #11653
Conversation
…deploy can't be cancelled mid-flight (#11640) migrate-db already has a job-level `cloud-db-migrate-<env>` concurrency group with cancel-in-progress:false, but the deploy-api / deploy-console / deploy-app jobs had none — they inherited only the workflow-level group, which did not protect the in-flight job. With the fleet's rapid develop→main promote cadence, every newer main run preempted the running Worker deploy, so NO Worker deploy completed since 19:13Z and prod ran stale code while only Pages/console updated. Add a per-job, per-env concurrency group (job-level groups are repo-wide, so they serialize the same job ACROSS runs — queue, never cancel): - deploy-api → cloud-cf-deploy-api-<production|staging>, cancel-in-progress:false - deploy-console→ cloud-cf-deploy-console-<pr-N|production|staging> - deploy-app → cloud-cf-deploy-app-<pr-N|production|staging> PR previews keep a per-PR group that DOES dedupe (cancel-in-progress:true); main/dispatch-prod and develop/staging never cancel. Distinct group per job so the three still run in parallel within a run. YAML validated (parses; 4/4 jobs carry concurrency). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Reviewed the workflow-only fix and pushed evidence commit Validation performed: I also added Manual review: the groups are distinct per deploy job, so API/Console/App can still run in parallel within a single workflow run; job-level groups serialize only the same deploy job across runs. This matches the issue intent and preserves PR preview dedupe for Pages jobs. |
lalalune
left a comment
There was a problem hiding this comment.
Approved after workflow review and evidence commit cefa56e9a0. The job-level concurrency groups protect production/staging deploy jobs from mid-flight cancellation while preserving PR preview dedupe and intra-run API/Console/App parallelism.
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Closes #11640.
[cloud-money]/ deploy lane.Bug (launch-critical)
migrate-dbhas a job-levelcloud-db-migrate-<env>concurrency group (cancel-in-progress:false), but the deploy jobs don't — they inherited only the workflow-level group, which didn't protect the in-flight job. With rapid develop→main promotes, every newer main run preempted the running Deploy API Worker job → no Worker deploy completed since 19:13Z, so prod ran stale code (only Pages/console updated). Evidence on the issue:Deploy API Workercancelled on 854455d + 1fb1c53×2.Fix
Per-job, per-env
concurrency(job-level groups are repo-wide → serialize the same job across runs, queue never cancel):deploy-api→cloud-cf-deploy-api-<production|staging>,cancel-in-progress:falsedeploy-console/deploy-app→…-<pr-N|production|staging>,cancel-in-progressonly for PR previewsDistinct group per job so the three deploys still parallelize within a run; PR previews still dedupe.
Verification
Can't run a workflow locally, so: YAML validated (
yaml.safe_loadparses; all 4 jobs carryconcurrency), groups confirmed distinct per job, and the pattern mirrors the already-workingmigrate-dbprotection + the workflow-level env resolution. Prove-out is the next promote completing a Worker deploy.Touches the multi-agent-contested
cloud-cf-deploy.yml— flagging rather than self-merging; resolve any conflict to develop's version. cc @standujar (deploy/ops)