feat(ci): promote Trigger.dev tasks in lockstep with the ECS traffic cutover#5725
feat(ci): promote Trigger.dev tasks in lockstep with the ECS traffic cutover#5725TheodoreSpeaks wants to merge 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Deploy jobs now use
Reviewed by Cursor Bugbot for commit 4b9c850. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR promotes Trigger.dev tasks alongside the ECS traffic cutover. The main changes are:
Confidence Score: 5/5The updated changes look safe to merge.
Important Files Changed
Reviews (9): Last reviewed commit: "fix(ci): require promote-images + deploy..." | Re-trigger Greptile |
…erify all ECS targets
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
…rse, pre-push dev epoch
|
@greptile review |
|
@cursor review |
|
@greptile review |
|
@cursor review |
…or promote-trigger
|
@greptile review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4b9c850. Configure here.
Summary
--skip-promotion, then promote the parked task version in lockstep with the ECS traffic cutover (CodeDeployAllowTraffic) instead of at deploy-finish. This closes the app↔task version-skew window (up to ~50 min on prod, where the deploy can queue behind a bake).AllowTrafficon every target. A retag/push epoch rejects a stale historical execution reusing the same digest.promote-trigger*promotes only after cutover; when the app image didn't change (no-op retag /.github-only commit) it promotes immediately instead of waiting.deploy-trigger+promote-trigger(gated onpromote-images.promoted); digest/epoch/changed come frompromote-images.deploy-trigger-dev+promote-trigger-dev, promoting thedev-simpreview branch (promote --env preview --branch dev-sim). Dev has nopromote-images, sobuild-devpublishes the digest/epoch/changed as an artifact..github/scripts/wait-for-ecs-cutover.shdoes the poll; verified end-to-end against real dev and staging deployments.Prerequisites before this runs
AWS_ROLE_TO_ASSUME,STAGING_AWS_ROLE_TO_ASSUME,DEV_AWS_ROLE_TO_ASSUME— managed outside the repo):codepipeline:ListPipelineExecutions/GetPipelineExecution/ListActionExecutions,codedeploy:GetDeployment/ListDeploymentTargets/GetDeploymentTarget, andecr:BatchGetImage(for the no-op app-image check — staging/prod roles already have it via the image verify step; the dev role needs it added).MaxSessionDuration>= the job'srole-duration-seconds(5400s prod/staging, 2400s dev), since the poll can outlast the default 1h session.TRIGGER_ACCESS_TOKENrepo secret (a Trigger.dev PAT — user-scoped, works for dev/staging/prod). It replaces the per-env token, soDEV_TRIGGER_ACCESS_TOKENcan be deleted. Then disable the Trigger.dev git integration for the envs moved into CI.Type of Change
Testing
wait-for-ecs-cutover.shrun against real completed dev and staging deployments: correctly resolved digest → pipeline execution → CodeDeploy deployment →AllowTraffic(exit 0), rejected a stale execution when the since-epoch was after its start, and timed out cleanly on an unmatched digest (exit 1).actionlintclean (only pre-existing custom-runner-label warnings);bun run lintandbun run check:api-validation:strictpass; YAML validated.Checklist