chore(release): don't activate kubernetes-nodes on the release-1.6 line - #3437
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
| {{include "cozystack.platform.package.default" (list "cozystack.capi-provider-infra-kubevirt" $) }} | ||
| {{include "cozystack.platform.package.default" (list "cozystack.bucket-application" $) }} | ||
| {{include "cozystack.platform.package" (list "cozystack.kubernetes-application" "kubevirt" $) }} | ||
| {{include "cozystack.platform.package" (list "cozystack.kubernetes-nodes-application" "kubevirt" $) }} |
There was a problem hiding this comment.
This single-line-removal is the only thing in the PR that needs to stay. Simply don't activate a feature that isn't ready yet and bring this line back when the feature is ready for launch.
There was a problem hiding this comment.
Done — reduced to just this one-line removal. The kubernetes-nodes app package, its API types, and the kubernetes-nodes-rd package are all restored; the feature is only deactivated in the iaas bundle now, and the line comes back when it's ready to launch. Thanks!
dbe28d0 to
6af47b4
Compare
… artifacts Supersedes the interim guard in this branch`s first commit, which skipped the overlay entirely for release-line PRs. Skipping fixed the wrong images but left those PRs testing their line`s last release: for any package the PR did not rebuild, the committed ref is the released digest, so a component changed by an earlier backport was exercised as its pre-backport binary until the next rc. The overlay now reads `cozystack-packages:<base branch>` instead of always `:main`, and build-release.yaml publishes that artifact for every maintained `release-<major>.<minor>` branch the way build-main.yaml does for main: images tagged with the branch, and the whole packages tree pushed with each reference digest-pinned to what the run just built. Each base branch therefore has its own generation to overlay from, which is what the original bug was really about — #3437 failed install because main`s cozystack-controller served an aggregated OpenAPI release-1.6`s charts could not validate against. Three deliberate choices: * The trigger matches line branches only (`release-[0-9]+.[0-9]+`). The per-release and rc staging branches promote-rc.yaml and tags.yaml create (release-1.6.1, release-1.6.0-rc.4) must not trigger a full rebuild — their images come from the tag build, and rebuilding them would be waste. * WRITE_CACHE stays 0. CACHE_REGISTRY/<img>:buildcache is a single ref per image and build-main.yaml is deliberately its only, serialized writer so concurrent builds cannot race on the cache manifest (the 409 class #2711 fixed for image tags). A line build can overlap a main build, so writing here would reintroduce that race. Line builds read the cache. * A missing artifact still degrades to committed refs, but on a release line it now emits a ::warning:: naming the branch. Silent degradation is indistinguishable from a working overlay, which is how a mis-specified branch filter would hide for a whole release cycle. Cost: one `make build` per push to a maintained line, i.e. per merged backport. hack/overlay-main-images_test.bats pins the artifact tag to the base branch, rejects a hardcoded :main in either overlay step, and pins build-release.yaml`s branch filter, image tag and WRITE_CACHE=0. Mutation-checked: restoring :main, setting WRITE_CACHE=1, and broadening the filter to release-* each fail a test. 13/13 green; actionlint and zizmor clean. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
… artifacts (#3471) ## What this PR does The PR finalize job overlays image refs for every package a PR did not rebuild, so e2e and the installer do not test last-release images for everything outside the PR's build matrix. It could only ever read `cozystack-packages:main`, which meant a **release-line PR was handed main's binaries to run against its own line's charts**. #3437 is the demonstration: a one-line change on `release-1.6` deactivating an app failed install deterministically, twice, with ``` helmrelease/backupstrategy-controller: Helm install failed … error validating data: SchemaError(github.com/cozystack/cozystack/pkg/apis/core/v1alpha1.Option.spec): unknown model in reference: "github.com~1cozystack~1cozystack~1pkg~1apis~1core~1v1alpha1.OptionSpec" ``` main's `cozystack-controller` served an aggregated OpenAPI that `release-1.6`'s charts could not validate against. Nothing in that PR was broken; the lane was. Both branches carry `option_types.go` and key `OptionSpec` identically in the committed generated OpenAPI, so this is a generation mismatch at runtime, not a codegen drift. This PR fixes it by giving every base branch its own artifact to overlay from, rather than by turning the overlay off. ### The change 1. **`pull-requests.yaml`** reads `cozystack-packages:${BASE_REF}` (`github.base_ref`) instead of a hardcoded `:main`. 2. **`build-release.yaml`** (new) publishes that artifact for maintained `release-<major>.<minor>` branches exactly as `build-main.yaml` does for main: every image tagged with the branch, and the whole packages tree pushed with each reference digest-pinned to what the run just built. An earlier revision of this branch simply skipped the overlay for non-main bases. That fixed the wrong-images problem but left release-line PRs testing their line's *last release*: for any package the PR did not rebuild, the committed ref is the released digest, so a component changed by an earlier backport was still exercised as its pre-backport binary until the next rc. Per-line artifacts remove that gap too, which is why the guard was replaced rather than kept. ### Three deliberate choices **The trigger matches line branches only** (`release-[0-9]+.[0-9]+`). The per-release and rc staging branches `promote-rc.yaml` and `tags.yaml` create — `release-1.6.1`, `release-1.6.0-rc.4` — must not trigger a full rebuild; their images come from the tag build and rebuilding them is waste. **`WRITE_CACHE` stays `0`.** `CACHE_REGISTRY/<img>:buildcache` is a single ref per image and `build-main.yaml` is deliberately its only, serialized writer so concurrent builds cannot race on the cache manifest — the 409 class #2711 fixed for image tags. A line build can overlap a main build, so writing here would reintroduce that race. Line builds read the cache. **A missing artifact still degrades to committed refs, but says so.** On a release line it emits a `::warning::` naming the branch. Silent degradation is indistinguishable from a working overlay, which is how a mis-specified branch filter could hide for a whole release cycle. ### Cost One `make build` per push to a maintained line — in practice per merged backport. That is the price of release-line PRs testing their line's tip instead of its last release. ### Verification `hack/overlay-main-images_test.bats` pins the artifact tag to the base branch, rejects a hardcoded `:main` in either overlay step, and pins `build-release.yaml`'s branch filter, image tag and `WRITE_CACHE: '0'`. Mutation-checked: restoring `:main`, setting `WRITE_CACHE: '1'`, and broadening the filter to `release-*` each fail a test. 13/13 green; `actionlint` and `zizmor` clean. Worth an explicit ack in review: the branch-filter pattern is the one thing no local test can prove, since only GitHub evaluates it. If it does not match, `build-release` never runs and the new `::warning::` is what surfaces it on the next release-line PR. ### Backport `release-1.6` needs this too — for `pull_request` events GitHub builds the workflow from the merge ref, so a release-line PR only stops receiving main's images once the change is on its base branch. #3472 carried the interim guard and is closed in favour of backporting this instead. ### Release note ```release-note NONE ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a “Build release line” workflow that builds and publishes images and the packages artifact for maintained `release-<major>.<minor>` branches. * **Bug Fixes** * Updated PR workflow finalization to use base-branch–specific package overlays, avoiding incorrect main-branch image references when targeting release branches. * Improved fallback behavior when the base-branch packages artifact is unavailable. * **Tests** * Added workflow wiring tests to verify base-branch artifact usage and that each maintained release line publishes its own packages artifact. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
…h, and publish per-line artifacts (#3514) ## What this PR does Hand backport of #3471 to `release-1.6`. Two clean cherry-picks, each carrying its `-x` reference; the resulting tree is byte-identical to #3471's merged state for all three files. The overlay must be fixed **on this branch** to have any effect here. For `pull_request` events GitHub builds the workflow from the merge ref, and for `push` events it reads the workflow from the pushed ref — so neither half of #3471 reaches this line while it lives only on `main`. Concretely, `build-release.yaml` on `main` never fires for a push to `release-1.6`, and a `release-1.6` PR keeps using this branch's copy of `pull-requests.yaml`. ## Why the bot could not do this The automatic backport reported success on every job and opened nothing (run 30817682877). It is not a conflict — #3471 carries an empty commit, `007d0b1a` (`chore(ci): re-trigger CI after a label event produced a no-op run`, zero files). `korthout/backport-action` cherry-picks commit-by-commit without `--allow-empty`, so that commit fails with `The previous cherry-pick is now empty`; the `draft_commit_conflicts` fallback then runs `git commit --all -m BACKPORT-CONFLICT`, which also has nothing to commit, and the action aborts: ``` git cherry-pick -x 007d0b1 The previous cherry-pick is now empty, possibly due to conflict resolution. git commit --all -m BACKPORT-CONFLICT The previous cherry-pick is now empty, possibly due to conflict resolution. git cherry-pick --abort Backport failed for `release-1.6`, because it was unable to cherry-pick the commit(s). ``` This is a general gap, not specific to this PR: any labelled PR containing an empty commit backports to nothing, and the failure surfaces as three green jobs. Worth a follow-up on the workflow — skipping empty commits, or having the action's failure fail the job — but that is out of scope here. ## What this unblocks #3437 fails install deterministically on this line today, because the unguarded overlay hands it main's `cozystack-controller` to run against `release-1.6`'s charts. The binary indexes `internal.cozystack.io/v1alpha1 TenantProjection` at startup, this branch ships no such CRD, so it fatals and every release that depends on it stalls. With this merged, the overlay reads `cozystack-packages:release-1.6` instead. That works even before the first `build-release.yaml` run publishes the artifact: a missing artifact degrades to the committed refs, which on this branch are the v1.6.0 digests its charts are written against. The degraded path is also no longer silent — it emits a warning naming the branch. #3437 will need a new head commit rather than a re-run, since the finalize job is reused on re-run and its existing `pr.patch` already has main's refs baked in. ## Note on cost Merging this is itself a push to `release-1.6`, so `build-release.yaml` fires on it and runs a full `make build` (up to 2h on a 24-cpu runner) to publish the line's images and `cozystack-packages:release-1.6`. That recurs per push to this line; `concurrency` with `cancel-in-progress` collapses bursts, and `paths-ignore` only exempts `docs/**`. ## Verification `hack/overlay-main-images_test.bats` 13/13 green on this branch, including the two wiring tests the backport brings (`the overlay reads the artifact for the PR's own base branch`, `every maintained release line publishes its own packages artifact`). `actionlint` clean on both workflows, and both parse as YAML. `hack/common-envs.mk` is byte-identical between `main` and `release-1.6`, so `IMAGE_TAG`, `WRITE_CACHE`, `PUBLISH_VERSIONED` and `PUBLISH_FLOATING` behave here exactly as they do on main. ### Release note ```release-note NONE ```
kubernetes-nodes isn't ready to launch on 1.6 yet. Remove only its include from the iaas platform bundle so the package still ships but stays inactive; restore the line when the feature is ready. The package, API types and RD package are kept intact. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
6af47b4 to
042c69c
Compare
The PR finalize job pulls cozystack-packages:main and repoints every package the PR did not rebuild at current-main images. On a main-based PR that is the whole point: it stops e2e from testing last-release images for everything outside the build matrix. On a release-line PR it is wrong — the committed refs there are not stale, they are that line`s released digests, and the charts are written against exactly those. So a release-line PR was installing main`s binaries onto its own charts, and the mismatch grows with every commit main gains. cozystack#3437 is the demonstration: a one-line change on release-1.6 that deactivates an app failed install deterministically, twice, with SchemaError(...core/v1alpha1.Option.spec): unknown model in reference: "...core~1v1alpha1.OptionSpec" from main`s cozystack-controller serving an aggregated OpenAPI that branch`s charts cannot validate against. Nothing in the PR was broken; the lane was. Left alone this makes every 1.6 backport look red, which is when release-branch PRs are busiest. Both overlay steps are now gated on `github.base_ref == main`, so a release-line PR keeps its committed digests — the behaviour that predates the overlay. Retargeting the overlay at a per-line artifact would be better but is not possible today: build-main.yaml publishes only cozystack-packages:main, and the registry carries no release-* equivalent (verified against the packages repo`s tag list: `main` plus per-PR tags, nothing else). hack/overlay-main-images_test.bats pins the wiring per step, so adding a third overlay step without the guard fails the suite. Mutation-checked by removing one guard. 12/12 green; actionlint clean. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
build-release.yaml publishes `cozystack-packages:<line>` on push to a release line, and pull-requests.yaml's overlay reads it so a release-line PR tests its own line's binaries instead of main's (#3471, #3437). It cannot fire for the push that creates the line. The freeze points release-X.Y at a commit that is already on main, so the push carries no new commits, and GitHub does not run a workflow whose paths/paths-ignore filter finds no changed files ("If there are no files changed, the workflow will not run"). The line would therefore have no artifact until its first cherry-pick merged, and in that window the overlay finds nothing to pull and leaves every package on its committed ref — at freeze time the previous release's, which is exactly the cross-generation mix #3437 fixed. The old flow had no such window: it branched at the promote merge commit, which carried real commits and its own release's refs. Add workflow_dispatch to build-release.yaml and have the freeze step dispatch it for the branch it just created, so the artifact exists from the moment the line does. The dispatch is non-fatal: without it the overlay no-ops and early cherry-pick PRs test their committed refs, which is where they were before #3471. The tag is pushed and the line is frozen by that point, so failing there would misreport both. The trigger also gives a line build a re-run button, which previously needed an empty commit pushed to the line. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
What this changes
kubernetes-nodesis not ready to launch on the 1.6 line yet, so this removes its single include from theiaasplatform bundle (packages/core/platform/templates/bundles/iaas.yaml). The platform stops activating the package while it still ships in the release; the line comes back when the feature is ready.Scope
One line removed, nothing else. The
kubernetes-nodesapp package, its API types (api/apps/v1alpha1/kubernetesnodes), and thekubernetes-nodes-rdsystem package are all kept intact — this deactivates the feature, it does not delete it.