Skip to content

ci(reconcile): auto-rewrite derived files when versions.yaml changes - #31

Merged
syscod3 merged 1 commit into
mainfrom
fix/oci-machine-classes
Aug 7, 2026
Merged

ci(reconcile): auto-rewrite derived files when versions.yaml changes#31
syscod3 merged 1 commit into
mainfrom
fix/oci-machine-classes

Conversation

@syscod3

@syscod3 syscod3 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What

Closes the 4.1b gap in the Talos upgrade pipeline: editing omni/versions.yaml to an already-built version (rollback, re-pin, canary tweak) used to leave oci-lab's derived files stale, because only the talos-images build rewrites them and it does not run when nothing needs building.

Adds .github/workflows/reconcile.yml, which on a push to main touching omni/versions.yaml runs scripts/check-version-drift.py --write and commits the derived-file fix.

Guarded split (no writer race)

  • Already-built target -> --write succeeds (installer exists in ghcr), reconcile commits here. Fully automatic.
  • Not-yet-built target -> installer_built() guard refuses with "build first", the job fails, and the operator runs the talos-images build as today; that build ships the installer and rewrites derived files (existing 4.2 path).

The paths: [omni/versions.yaml] filter means the reconcile commit (no versions.yaml change) cannot re-trigger the workflow, so it converges.

Verified

Throwaway-worktree test: v1.13.6 re-pin -> --write rewrote both machine classes (rc 0); v9.9.9 unbuilt -> refused (rc 1), derived files untouched.

Objective of change

This is pick + me hooks wire from a prior parent PR. Supports the same trunk.

Editing omni/versions.yaml to a version that needs no new build (re-pin,
rollback, canary tweak) used to leave oci-lab's machine classes and cluster
template stale: only the talos-images build rewrote them, and it does not run
when nothing needs to be built.

On a push to main touching omni/versions.yaml this workflow runs
check-version-drift.py --write and commits the derived-file fix.

The installer_built() guard keeps the two writers from racing:
  * Already-built target  -> --write succeeds, derived files committed here.
  * Not-yet-built target  -> the guard refuses, the job fails with a clear
    'build first' message, and the operator runs the talos-images build as
    before; that build ships the installer and rewrites derived files (4.2).
So pin-then-build stays the release model for genuinely new versions, while
re-pins become fully automatic.

Verified in a throwaway worktree: v1.13.6 re-pin rewrote both machine classes
(rc 0, clean diff); v9.9.9 unbuilt refused (rc 1, derived files untouched).
The paths filter means the reconcile commit (no versions.yaml change) cannot
re-trigger the workflow.
@syscod3
syscod3 merged commit 74fd1db into main Aug 7, 2026
5 checks passed
@syscod3
syscod3 deleted the fix/oci-machine-classes branch August 7, 2026 20:58
syscod3 added a commit that referenced this pull request Aug 8, 2026
…31)

Editing omni/versions.yaml to a version that needs no new build (re-pin,
rollback, canary tweak) used to leave oci-lab's machine classes and cluster
template stale: only the talos-images build rewrote them, and it does not run
when nothing needs to be built.

On a push to main touching omni/versions.yaml this workflow runs
check-version-drift.py --write and commits the derived-file fix.

The installer_built() guard keeps the two writers from racing:
  * Already-built target  -> --write succeeds, derived files committed here.
  * Not-yet-built target  -> the guard refuses, the job fails with a clear
    'build first' message, and the operator runs the talos-images build as
    before; that build ships the installer and rewrites derived files (4.2).
So pin-then-build stays the release model for genuinely new versions, while
re-pins become fully automatic.

Verified in a throwaway worktree: v1.13.6 re-pin rewrote both machine classes
(rc 0, clean diff); v9.9.9 unbuilt refused (rc 1, derived files untouched).
The paths filter means the reconcile commit (no versions.yaml change) cannot
re-trigger the workflow.
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.

1 participant