Skip to content

ci(repo): re-read the slim mirror destination tag before failing - #6774

Merged
avallete merged 2 commits into
developfrom
avallete/four-destination-mirror-failures-32fc5d
Sep 24, 2026
Merged

avallete merged 2 commits into
developfrom
avallete/four-destination-mirror-failures-32fc5d

Conversation

@avallete

Copy link
Copy Markdown
Member

Summary

Mirror Slim Image sometimes fails its destination check with public.ecr.aws/supabase/cli/<service>:<version> resolves to <X>, expected <Y> (or resolves to missing for a new tag), even though the copy succeeded.

In these failures <X> is the tag's previous build digest. No other writer touches the tag afterward, the sender's own poll sees the expected digest seconds later, and the tag converges without a re-run. ECR Public serves a stale tag for a short time after an overwrite; this isn't a race between writers. Mirror runs for the same (service, version) are already serialized by the workflow's concurrency group.

verify-digest now accepts an optional ATTEMPTS (default 1) and re-reads the tag 10 s apart until it matches. Only the destination check sets ATTEMPTS: "13" (~2 min, well within the job timeout). The source check stays single-shot because it's the check that the dispatch payload can be trusted.

Linked issue

Supabase maintainer change; no linked issue.

🤖 Generated with Claude Code

ECR Public can keep serving a tag's previous digest (or a 404 for a new
tag) for a short while after a push, so the destination digest check now
re-reads the tag up to 13 times, 10 s apart. The source check stays
single-shot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avallete
avallete requested a review from a team as a code owner September 24, 2026 09:00

@github-actions github-actions 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.

🤖 AI Review

All three findings are confirmed. The destination check retries permanent command failures for up to two minutes. Direct callers of the exported verifier can cause an unbounded loop with NaN attempts, although main validates the workflow value. The sleep fallback is duplicated.

Findings

Severity Location Category Sources Claim
🟡 MINOR .github/scripts/mirror-slim-image.ts:115 robustness claude Calling verifyDigest directly with NaN attempts causes an unbounded retry loop.
🟡 MINOR .github/scripts/mirror-slim-image.ts:128 error-handling codex The destination check retries permanent regctl failures, including authentication errors, before reporting them.
⚪ NIT .github/scripts/mirror-slim-image.ts:503 style claude main supplies a Bun.sleep fallback that verifyDigest already supplies.

Stats

Claude findings: 2 · Codex findings: 1 · Confirmed: 3 · Refuted: 0 · Uncertain: 0


Models: claude-opus-5-5 + gpt-6-sol · Trigger: auto · Workflow run

This review runs once per PR. A maintainer can request another with a /ai-review comment.

Comment thread .github/scripts/mirror-slim-image.ts Resolved
Comment thread .github/scripts/mirror-slim-image.ts Resolved
Comment thread .github/scripts/mirror-slim-image.ts Resolved
Re-read the destination tag only on a digest mismatch or a 404, so
authentication and other registry errors fail on the first read.
verifyDigest now rejects a non-integer or non-positive attempt count
itself, and main no longer duplicates its sleep fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@avallete
avallete enabled auto-merge September 24, 2026 10:29
@avallete
avallete added this pull request to the merge queue Sep 24, 2026
Merged via the queue into develop with commit 373b898 Sep 24, 2026
54 checks passed
@avallete
avallete deleted the avallete/four-destination-mirror-failures-32fc5d branch September 24, 2026 10:40
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.

2 participants