Fire the GA promote on the master merge instead of a manual dispatch - #166
Draft
jsokol wants to merge 2 commits into
Draft
Fire the GA promote on the master merge instead of a manual dispatch#166jsokol wants to merge 2 commits into
jsokol wants to merge 2 commits into
Conversation
Publishing the release images was the one manual step in the release, and nothing failed if it was skipped -- :latest simply stayed on the previous release while every monitored stage reported green. Fire on a master push instead, path-filtered to simplerisk-minimal/Dockerfile (the file carrying the `ENV version=` this job promotes). workflow_dispatch stays for heals. Auto-firing is safe precisely BECAUSE nothing is rebuilt. The 20260820-001 failure came from rebuilding on a master push and racing the GA bundle upload; a retag touches no bundle. The deliberate release gate moves to where the release decision is actually made -- the code-development testing -> master merge, restricted to release owners -- rather than a second dispatch nobody is prompted to run. This reverses the "manual workflow_dispatch" line in the 2026-07-10 design on purpose. Adds an idempotence guard so the automatic path is safe to re-enter: if :latest already resolves to the digest we would promote for every image, all five mutating steps skip. A dispatch always runs in full. The guard fails loudly when the minimal RC tag is ABSENT rather than treating it as "nothing to do" -- that condition means the release has no images to promote, which must not surface as a green no-op run. Guard logic exercised offline across 8 scenarios (already-promoted, new release, each image differing alone, minimal RC missing, full RC missing, both skip_full paths): correct verdict and exit status in every case, no set -e traps in the && chains. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Description
Makes GA promotion automatic. Today
promote-latest.ymlisworkflow_dispatch-only, which means publishing the release images is the one manual step in the release — and nothing fails if it is skipped::latestsilently stays on the previous release while every monitored stage reports green.Fires on a
masterpush instead, path-filtered tosimplerisk-minimal/Dockerfile— the file carrying theENV version=this job promotes, so it changes on exactly the pushes that matter.workflow_dispatchstays for heals.Paired with code-development's side, which opens the docker
testing → masterPR when the release merges to code-development'smaster. That merge lands here, and this fires.Why auto-firing is safe now
It's safe precisely because nothing is rebuilt. The 20260820-001 failure came from rebuilding from the prod S3 bundle on a master push and racing its upload; a retag touches no bundle at all.
Note
This deliberately reverses one line of the approved design (
2026-07-10-release-image-promotion-design.md), which specified "Triggered by manualworkflow_dispatch(deliberate release gate; no accidental promotion from a branch merge)."The gate isn't removed — it moves to where the release decision is actually made: the code-development
testing → mastermerge, which is restricted to release owners. A second dispatch is a second gate for the same decision, and it's the one nobody is prompted to perform.Idempotence guard
A
masterpush can touch that Dockerfile without being a release (a CVE regeneration at an unchanged version), and re-promoting would re-mirror to GHCR, mint fresh cosign signatures, and rewrite SSM for nothing. NewDecide whether anything needs promotingstep: if:latestalready resolves to the digest we'd promote for every image, all five mutating steps skip. Aworkflow_dispatchalways runs in full.An absent RC tag is treated as an error, not as "nothing to do." That condition means the release has no images to promote — the loudest thing this workflow can say — so it must not surface as a green no-op run.
Release Notes
None — internal change. The released container images will now publish automatically at GA rather than depending on a manual step.
Manual Validation Steps
promote-latestmanually against the current release. It should run in full (dispatch bypasses the guard) and be a no-op in effect, since:latestalready points at 20260820-001's digests.testing → mastermerge and that:latest/:testingdigests match for both images afterwards.nothing to promotein the step summary, and skip all mutating steps.Type of Change
Testing Results
actionlintclean;shellcheck -S warningclean on every embeddedrunblock.skip_full_imagepaths. Correct verdict and exit status in every case.set -etrap in the&&chains: bash exempts non-final commands in an&&list, confirmed by execution rather than assumed.Promote×2,Mirror,Configure AWS credentials,SSM).:latestback is oneimagetools create.CIA Impact Check
MAY negatively impact Confidentiality, Integrity and/or Availability.
Justification for the change
:lateston the previous version for several hours for exactly this class of reason.Potential impact on Confidentiality, Integrity and/or Availability
Availability (the main change). Production
tier=latestservices roll when SSM changes, and that now happens without a human pressing anything. The trigger is a merge tomaster, which only release owners can perform, and the promoted artifact is the digest already validated in testing. The idempotence guard prevents an unrelated Dockerfile change from re-rolling the fleet.Integrity. Unchanged — the promoted bytes are the same RC digest, and the currency guard against
:testingstill refuses a stale version. The new guard only decides whether to act, never what to promote.Confidentiality. No change. Same permissions, same
environment: release, no new secrets.Additional Implementation Steps
Requires the code-development counterpart to open the
testing → masterPR at GA; until that lands, this changes nothing in practice because no automation pushes tomaster.