You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 858ebaa
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/agents/image-refs.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,8 @@ If a package stamps a reference somewhere the two globs do not cover, add that f
53
53
| Tool | Reads | Job |
54
54
| --- | --- | --- |
55
55
|`hack/promote-rewrite-tags.sh`| all three shapes | rewrite `X.Y.Z-rc.N` → `X.Y.Z` in the tree, then fail if any survives |
56
+
|`hack/promote-packages-artifact.sh`| the rewritten packages tree | publish a reproducible temporary stable-candidate artifact and pin its digest in the installer |
57
+
|`hack/verify-promoted-packages.sh`| pinned candidate + merged tree + embedded rc artifact ref | before any stable tag is created, prove the candidate contains the merged tree and the rc's container digests |
56
58
|`hack/promote-retag.sh`| all three shapes | copy each digest to its stable tag in the registry |
57
59
|`hack/nightly-mirror.sh`| all three shapes | copy each digest to the public registry, then rewrite hosts in the same file set |
58
60
|`hack/overlay-main-images.sh`|`values.yaml` + `*.tag`| overlay current-main references onto packages a PR did not rebuild |
@@ -77,10 +79,12 @@ Collection understands both shapes — the host is rejoined, so a split-key ref
77
79
78
80
**`charts/` is excluded, and is almost always right.** Vendored upstream chart values are regenerated by `make update` and their images are neither built nor pushed here. The one exception is `packages/system/cozystack-scheduler/charts/cozystack-scheduler/values.yaml`, which pins a first-party-namespace image. Excluding it is still correct — it is built by a separate repository, component-versioned, and already published to the public registry, so no retag or mirror is owed — but "everything under `charts/` is third-party" is not literally true.
79
81
80
-
## Why promotion does not rebuild
82
+
## Why promotion does not rebuild containers
81
83
82
-
Promotion copies the release candidate's images to the stable tag **by digest**, so the stable release is bit-for-bit what passed end-to-end testing. Nothing is recompiled, and promotion cannot diverge from what was tested. The only thing that changes in the tree is the cosmetic tag string, which is what `hack/promote-rewrite-tags.sh` does — and why getting its file coverage right is the difference between a release that reads as a release and one that reads as a release candidate.
84
+
Promotion copies the release candidate's container images to the stable tag **by digest**, so every executable image in the stable release is bit-for-bit what passed end-to-end testing. Nothing is recompiled. The packages OCI artifact is declarative configuration rather than a container image, and its content must change: `hack/promote-rewrite-tags.sh` replaces the rc tag strings in the tree, the workflow commits that exact content, then `hack/promote-packages-artifact.sh` serializes it under a run-specific temporary `promotion-*` tag and a second commit pins its new digest in the installer. Promotion first requires the target base to carry the candidate-aware pipeline. The promotion PR checks the candidate against its prospective merge; finalize repeats the check before creating any stable name. Both require the candidate and its embedded rc baseline to use the trusted public `cozystack-packages` repository, follow the old self-reference back to that rc artifact, and prove that all container digests stayed fixed.
85
+
86
+
The packages artifact includes `core/installer/values.yaml`, so it cannot contain its own digest: writing that digest changes the payload and produces another digest forever. The separately published installer chart carries the real candidate pin used at runtime; the older `platformSourceRef` embedded inside the packages artifact is inert because the platform PackageSource does not install `core/installer`. Verification normalizes exactly that field and rejects every other difference. It also models Flux's established archive semantics: symlinks in the source tree are omitted rather than followed, matching the RC packages artifacts produced by the existing build.
83
87
84
88
## Testing
85
89
86
-
`hack/promote-rewrite-tags_test.bats` round-trips the rewrite against the real tree: it stamps a synthetic release-candidate version into every first-party reference, runs the rewrite, and asserts nothing retains it. This is the check that catches a new storage shape, and it runs under `make unit-tests` without a cluster, a registry or a release. Any change to how references are stored must keep it passing.
90
+
`hack/promote-rewrite-tags_test.bats` round-trips the rewrite against the real tree: it stamps a synthetic release-candidate version into every first-party reference, runs the rewrite, and asserts nothing retains it. `hack/promote-packages-artifact_test.bats` covers deterministic candidate naming, metadata and digest pinning; `hack/verify-promoted-packages_test.bats` proves the self-reference exception is narrow and catches rc refs or post-publish tree drift. These checks run under `make unit-tests` without a cluster, a registry or a release. Any change to how references are stored or promoted must keep them passing.
0 commit comments