Repository navigation
fix: Docker Scan & Promote never moves latest back to an older commit - #448
Merged
Merged
Conversation
HardMax71
enabled auto-merge (squash)
October 22, 2026 13:35
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Found while working on #317. Docker Scan & Promote copies each finished CI run's
sha-images tolatestwith no ordering check, so the run that finishes last wins even when its commit is older. On 2026-10-22, run 39783092976 promotedsha-5907c4d(#444) at 13:00 UTC, then run 39784413692 movedlatestback tosha-b58229c(#445) at 13:09. The nightly release takes whateverlatestis, so it would have deployed b58229c and rolled back #444.Changes
The promote job checks out main and walks the commits after the candidate. When
latestalready holds the image of one of them, it leaveslatestalone and says so in the step summary; the Summary job runs only after a real promote. Aconcurrencygroup keeps two promotes from racing between the check and the copy.Type of Change
Test Plan
cd backend && uv run pytest tests/unit)cd frontend && npm run test)docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')cd frontend && npm run test:e2e)./deploy.sh openapi, then./deploy.sh types), never edited by handValidation: the check replayed with real registry digests skips b58229c while
latestis 5907c4d, and promotes 5907c4d over b58229c. A bad SHA stops the step underset -e. actionlint reports the same 14 findings as on main, all in the Summary step.Checklist
pre-commit run --all-filesand all checks passSummary by cubic
Fixes Docker Scan & Promote so
latestnever gets moved back to an older commit. CI runs finish in any order, so the last-finishing run previously won even when its commit was older.The promote job now checks out
main, verifies whetherlatestalready holds the image of any newer commit, and leaves it alone when it does. Aconcurrencygroup serializes promotes, and the Summary job runs only after a real promote.Written for commit 8eec014. Summary will update on new commits.