Skip to content

fix(ci): predict the promoted app digest instead of trusting a read right after the retag - #9416

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/ci-promote-ecr-read-race
Oct 28, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/ci-promote-ecr-read-race

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • promote-app-image.sh decided whether the app deploy tag moved by reading the tag right after retagging it. That read can still return the previous image, so a moved tag was reported as unchanged. trigger-promote then checked the wrong pipeline execution: it refused to promote when a new execution had already started. If the read had lagged until before the execution started, it could instead have matched the previous execution and promoted Trigger.dev tasks before the app cut over
  • The script now computes the digest the retag will push from imagetools create --dry-run before moving the tag. The dry run prints the exact manifest plus a trailing newline, so its hash is the pushed digest. After the move it waits up to a minute for the tag to resolve to that digest, failing loudly if it never does, then compares the predicted digest with the previous one

Type of Change

  • Bug fix

Testing

  • Against the registry: the dry-run hash of a real staging retag equals the digest the registry stored for that retag
  • Script run in a Linux container with stubbed docker/aws: a stale read that catches up reports changed=true with the new digest; a genuinely unchanged retag reports changed=false; a tag that never resolves fails with exit 1; a first push with no previous tag reports changed=true
  • The pre-fix script on the stale-read case reports changed=false with the previous digest, reproducing the failure
  • bash -n

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Oct 28, 2026 7:04pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread .github/scripts/promote-app-image.sh
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge, with no new blocking issues found.

Summary

The PR predicts the app image digest before moving the deploy tag, then waits for ECR to return that digest before reporting promotion outputs.

  • CI confirms the promoted app image digest before reporting the tag change.

Reviews (2) · Last reviewed commit: "fix(ci): bound the promoted-tag wait by ..." · Reviewed by Greptile

Comment thread .github/scripts/promote-app-image.sh Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 8563d25 into staging Oct 28, 2026
68 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/ci-promote-ecr-read-race branch October 28, 2026 19:20
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