Skip to content

fix: Docker Scan & Promote never moves latest back to an older commit - #448

Merged
HardMax71 merged 1 commit into
mainfrom
max/fix-promote-order
Oct 22, 2026
Merged

HardMax71 merged 1 commit into
mainfrom
max/fix-promote-order

Conversation

@HardMax71

@HardMax71 HardMax71 commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Found while working on #317. Docker Scan & Promote copies each finished CI run's sha- images to latest with no ordering check, so the run that finishes last wins even when its commit is older. On 2026-10-22, run 39783092976 promoted sha-5907c4d (#444) at 13:00 UTC, then run 39784413692 moved latest back to sha-b58229c (#445) at 13:09. The nightly release takes whatever latest is, 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 latest already holds the image of one of them, it leaves latest alone and says so in the step summary; the Summary job runs only after a real promote. A concurrency group keeps two promotes from racing between the check and the copy.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or tooling changes

Test Plan

  • Backend unit tests pass (cd backend && uv run pytest tests/unit)
  • Frontend unit tests pass (cd frontend && npm run test)
  • Backend E2E tests pass (docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')
  • Frontend E2E tests pass (cd frontend && npm run test:e2e)
  • API spec and client regenerated if routes or schemas changed (./deploy.sh openapi, then ./deploy.sh types), never edited by hand
  • Manual testing performed

Validation: the check replayed with real registry digests skips b58229c while latest is 5907c4d, and promotes 5907c4d over b58229c. A bad SHA stops the step under set -e. actionlint reports the same 14 findings as on main, all in the Summary step.

Checklist

  • My code follows the project's style guidelines
  • I have run pre-commit run --all-files and all checks pass
  • I have added tests that prove my fix/feature works
  • I have updated documentation if needed
  • My changes don't introduce new warnings

Summary by cubic

Fixes Docker Scan & Promote so latest never 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 whether latest already holds the image of any newer commit, and leaves it alone when it does. A concurrency group serializes promotes, and the Summary job runs only after a real promote.

Written for commit 8eec014. Summary will update on new commits.

View guided diff Turn on auto-fix

@HardMax71
HardMax71 enabled auto-merge (squash) October 22, 2026 13:35
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de2b8626-f275-4ac8-90b4-6dcb4d2ec4c7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area: deploy Compose, images, release workflow, production host area: ci GitHub workflows, test infrastructure, repo tooling labels Oct 22, 2026
@sonarqubecloud

Copy link
Copy Markdown

@HardMax71
HardMax71 merged commit e4fc245 into main Oct 22, 2026
20 checks passed
@HardMax71
HardMax71 deleted the max/fix-promote-order branch October 22, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci GitHub workflows, test infrastructure, repo tooling area: deploy Compose, images, release workflow, production host documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant