Repository navigation
Description
Problem
k8s/devops/kustomization.yaml pins ghcr.io/dan-petty/devops-cli/service with newTag: vX.Y.Z, and the release cut bumps it on the release branch. Argo CD's devops application tracks main (path k8s/overlays/homelab/devops, which only includes k8s/devops) and reconciles every 120 s. The image itself is published only by release.yml on the merge to main, after devops release check. For v0.2.28 the release run took from 23:43:28 to 23:50:20.
So for several minutes after every release merge, main pins an image that does not exist yet. The roadmap Service's Deployment uses strategy: Recreate, because its home volume is ReadWriteOnce, so the running pod is stopped before the new one is created. That pod then backs off on the missing image, and the CronJob that uses the same image fails too. If the release run fails, as it did for v0.2.27 and as every automatic cut does today (companion changelog item), the outage lasts until a person fixes the release.
Proposed remedy
Make the image a release pins exist before main pins it, so a merge can only deploy a published image. The design chooses one of:
- publish
service:vX.Y.Zfromrelease/vX.Y.Zon every push once the branch holds version X.Y.Z, so the merged tree's image already exists; - an Argo CD sync gate that waits for the image;
- a required check on the release pull request that builds and pushes the image;
- pinning by digest.
Weigh tag mutability, the cluster's imagePullPolicy: IfNotPresent, provenance attestation, and GitOps (the cluster is git).
Key questions
- Which mechanism? Proposed: publish from the release branch, because it is the smallest change to
release.yml, keeps Argo CD and the manifests as they are, and needs no new cluster component. The design phase decides on evidence. - Is
release.yml's merge-time build still needed? Proposed: it re-tags or verifies the image the release branch published for the merged commit, solatestand the attestation stay right.
Acceptance criteria
- After the change, the image
mainpins for a release exists in GHCR before the release pull request can merge, shown by a workflow test or a check on the release pull request. - The roadmap Service never runs a pod whose image tag is unpublished during a release, documented in
k8s/README.mdand RELEASE_CYCLE.md. - actionlint passes,
uv run devops cipasses, and any logic in Python is tested offline.
Related: #741, #753, #1283, #1260, #1360.
Opened as a borrow (#1153, budget/borrowed): a bug that takes the roadmap Service down on every release, placed in v0.2.29 by the owner on 2026-10-08.
Update 2026-10-08: delivered scope
Mechanism. The image is published from the release branch, which is the remedy the issue proposed. release.yml also runs on pushes to release/v*.
On a push to release/vX.Y.Z that holds X.Y.Z, the run builds, smoke-tests and scans service:vX.Y.Z, pushes it by digest, attests it and then tags it. It does this when the image's inputs changed, or when the tag's image has no release.yml provenance. The inputs are Dockerfile, .dockerignore, pyproject.toml, uv.lock, src and release.yml, hashed with git ls-tree into the label io.github.dan-petty.devops-cli.image-inputs.
- It does nothing before the cut, on a superseded commit, or once
mainholds the version. - It fails when
mainhas image changes the branch lacks (git merge-tree). The fix is achore/open-vX.Y.Z-mainpull request into the branch, merged with a merge commit. It also fails when the branch tip can't be read. - Right before tagging, it checks the branch tip and
mainagain. A release merged during the build keeps the imagemainpins, and the run fails instead of moving the tag.
On main, release.yml points latest at that image once gh attestation verify passes. The check accepts only release.yml signing on main or on the release branch. release.yml never replaces service:vX.Y.Z: when the merged tree has other inputs, it warns and the difference ships in the next release. It builds the image only when no image has the tag.
ci.yml. Service Image no longer builds this repository's release pull request, which saves about 36 runner-minutes per release (measured on v0.2.28).
Acceptance criteria:
- Criterion 1: shown by the 'Build & Publish Service Image' check on the release PR's head commit. Also by
tests/test_release_service_image_plan.py, whose 25 offline cases run the plan and tag steps verbatim, and by therelease.ymlinvariants intests/test_ci.py. - Criterion 2: documented in
k8s/README.md('When a release merges into main', step 3) andRELEASE_CYCLE.md.docs/ROUTINE_TASKS.mdfollows. - Criterion 3: actionlint and
uv run devops cipass.
Pending a person, on the first real run (the v0.2.29 cut and merge):
gh attestation verify ... --signer-workflow dan-petty/devops-cli/.github/workflows/release.yml --source-ref refs/heads/release/v0.2.29passes.- A later branch push that leaves the inputs alone logs
was built and attested from these inputs already. latestandv0.2.29share one digest.devops argo cd apps status devopsis Synced and Healthy, with no ImagePullBackOff.
Not in scope:
- Making the check required (fix(release): a release pull request rehearses the cut and the release job read-only, so a green pull request means the release job passes on merge #1425).
- Collecting fragments at the cut (fix(release): the Service's cut commit collects the changelog fragments into the version's CHANGELOG.md section #1450).
- GHCR retention for untagged digests.
- Older
chore/cut-vbranch names elsewhere in the docs.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 8, 2026
Placed in v0.2.29 by the owner on 2026-10-08: without this fix the roadmap Service is not updated by the v0.2.29 release, and goes down instead. Please keep it in v0.2.29.
dan-petty-bot commentedon Oct 8, 2026
Intake placed this item to the backlog: only a critical fix joins the current release at intake; a release start pulls Ready items in, P0 features first.
Recurring outage on every release of a homelab service, but limited blast radius and a manual workaround (fix the release run) exist.Every release currently takes the roadmap Service and its CronJob offline for minutes or longer, directly harming the project's own delivery pipeline.The smallest proposed fix (publish the image from the release branch in release.yml) touches one workflow and a verification step, but requires weighing tag mutability, attestation, and GitOps constraints.dan-petty commentedon Oct 8, 2026
Owner decision, 2026-10-08: v0.2.29 waits for this item. The roadmap Service (still on v0.2.28, which lacks #1349) moved it to the backlog at intake. It is placed back in v0.2.29 when its pull request is ready to merge, and the v0.2.29 release pull request merges only after it and the changelog collection have landed on
release/v0.2.29.fix(release): publish the Service image from its release branch, so m…
dan-petty-bot commentedon Oct 8, 2026
What changed
#1452, merged into
release/v0.2.29as 345bf4d.10 file(s) changed.
How it was verified
Check runs at 5116495:
Acceptance Criteria of
docs/agent/tasks/task-1451-image-before-main-pins-it.md:mainpins for a release exists in GHCR before the release pull request can merge, shown by a check on the release pull request and by workflow tests. Each push torelease/vX.Y.Zthat holds X.Y.Z runs Build & Publish Service Image on the release pull request's head commit, anddevops pr check-readinessblocks a merge while that check is pending or failed.tests/test_release_service_image_plan.pyruns the plan step verbatim under bash in a real git repository with a bareorigin, with onlydocker,ghand, for an unreachable remote,git ls-remotefaked onPATH. For the plan it covers before the cut, the cut, a push that leaves the inputs alone, an imagerelease.ymldid not attest, a fix after the cut, a superseded run, an unreadable branch tip,mainwith image changes the branch lacks and with other commits, a re-run after the merge,mainwith matching inputs, the release merge, a later push and a recovering push with other inputs, an imagemain's own run built, an unattested image onmain,mainwith no image, and a GHCR read error. It runs the tag step verbatim too: the branch tip,mainwithlatest, a release merged during the build, a run superseded during the build, and an unreadable branch tip.test_service_image_release_job_invariants(tests/test_ci.py) pins the triggers, the job and step gates, the step order (plan, build, smoke, scan, push, attest, tag), the push by digest with no tags, the promote step, andshell: bashon the plan and tag steps.test_release_service_image_inputs_are_what_the_image_is_built_from(tests/test_architectural_invariants.py) keepsSERVICE_IMAGE_INPUTSin step with the Dockerfile.k8s/README.md("When a release merges into main", step 3) andRELEASE_CYCLE.md(diagram, Step 3 item 2, critical-fix item 3, Step 5 item 5).docs/ROUTINE_TASKS.mdfollows.release.ymlandci.yml, anduv run devops cipasses. The plan's logic is bash in the workflow, tested offline: no test reaches the network or a registry, and each call phase is under 1 s.changelog.d/1451.mdexists, andCHANGELOG.mdanddocs/ROADMAP.mdare untouched.release/v0.2.29, rungh run list -R dan-petty/devops-cli --workflow release.yml --branch release/v0.2.29 --limit 3and open the newest run. Build & Publish Service Image shows the plan'spublish, then the push by digest, the attestation and the tag step. Thendocker buildx imagetools inspect ghcr.io/dan-petty/devops-cli/service:v0.2.29 --format '{{ .Manifest.Digest }} {{ index .Image.Config.Labels "io.github.dan-petty.devops-cli.image-inputs" }}'prints a digest and a 64-character hash, andgh attestation verify oci://ghcr.io/dan-petty/devops-cli/service:v0.2.29 -R dan-petty/devops-cli --signer-workflow dan-petty/devops-cli/.github/workflows/release.yml --source-ref refs/heads/release/v0.2.29passes. The next push torelease/v0.2.29that leaves the image's inputs alone, such as thechangelog.d/collection, logswas built and attested from these inputs alreadyin its plan step, which showsgh attestation verifyworks with the job's token.mainrun's plan step logspromotewithin seconds, anddocker buildx imagetools inspect ghcr.io/dan-petty/devops-cli/service:latest --format '{{ .Manifest.Digest }}'prints the same digest asservice:v0.2.29.devops argo cd apps status devopsis Synced and Healthy, andkubectl -n devops rollout status deploy/roadmap-service --timeout=300ssucceeds with noImagePullBackOffinkubectl -n devops get pods -l app.kubernetes.io/name=roadmap-service.feat(release): v0.2.29 (#1455)
refactor(release): the release no longer pins, bumps or pre-publishes…
feat(release): v0.2.32 (#1516)