test(operator): upgrade the operator with the tag's own AICR #3893
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #3893"
general
weight: 0.35
lalitadithya
Summary
The release gate's operator upgrade lane (
make operator-qualify-published) again upgrades the published operator, running its own AICR, to the candidate running the tag's own AICR. The lifecycle suite now follows whatever recipe the running AICR resolves, so a stock component that a release adds or drops needs no change to the suite.Motivation / Context
d34934858 unblocked v1.3.0 GA by holding AICR at the published release's version on both sides of the upgrade. The suite disabled the kind recipe's components using the names in the first plan. AICR v1.3.0 added
nktp, so after the upgrade the candidate resolved a new plan that installs it, and the lane could not pass. This restores the coverage that hold removed.Fixes: #3856
Related: N/A
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)tests/operator/qualify),tools/operator-qualify, release and operator-e2e workflow commentsImplementation Notes
Upgrade scenario (
upgradeMidRollout):1. Pin the in-flight rollout's plan before the upgrade.
2. Once the resolver runs the next candidate's AICR (
status.aicr.image), remove the component toggles. The new AICR then resolves its whole recipe.3. Wait for the rollout to end
Succeededwith one sync, as before.4. Disable every component of the new recipe except cert-manager, unpin, and roll out the plan that resolves. If the new AICR leaves cert-manager's render unchanged, that is the pinned plan, with no new rollout. When both candidates run the same AICR, a different plan fails the scenario, because a plan's digest leaves out the operator that resolved it. That keeps the upgrade-idempotence check the scenario always had.
The toggles go before the new recipe is read because a toggle naming a component that recipe lacks stalls resolution ("unknown component"), and the stall holds the rollout. The pin is there so that the plan of the whole recipe, resolved in between, never becomes the target. Without it, the operator opens a rollout that would install every component.
Rollback scenario (
rollbackToInstalled): beforehelm rollback, pin the active plan and remove the toggles. Without the pin, the older AICR would assess a move to whatever plan it resolves.operations.mddocuments that an older AICR can reject a recipe written by a newer one, and has administrators pin a plan before lowering AICR. Without removing the toggles, the older AICR rejects any toggle that names a component its recipe lacks ("unknown component"). After the re-upgrade, the scenario restores the saved overrides and selection, and requires them to resolve the active plan again.Every assertion about the older operator stays the same: it does not stall, rewrites no plan or rollout, and makes no engine write. They now run once it has resolved the runtime, seen as a new input digest (the operator version is an input) or a stall, followed by the same one-minute settle as before. The older operator now resolves a whole recipe here, which can take longer than that minute. Because the target is pinned, the older AICR assesses no transition here. Pinning an earlier plan and rolling back to it, the full documented procedure, is not exercised.
Which AICR each side runs (
tools/operator-qualifyhold_aicr): each candidate runs its own AICR. The exception is when the next candidate's AICR is older than the installed candidate's; then both run the installed one's. That is the case on pull requests today: the published v1.3.0 runs AICR v1.3.0, while the.settings.yamlpin is v1.2.0. Moving to an older AICR requires pinning an earlier plan first, which an operator upgrade does not do. At a release tag the candidate's AICR is the tag's, which is newer, so the gate moves AICR forward as the chart defaults do. A prerelease precedes its release. A candidate whosecandidate-values.yamlnames no AICR release fails the run. The rule lives in the tool, not in the Makefile, somake operator-qualifyand the release lane share it.Smaller changes:
tools/operator-qualifyadds every namespace the checkout's component registry names to the chart'snamespaces.components. A resolution that renders a release outside that list stalls withNamespaceNotAllowed, and the new AICR's whole recipe is rendered once. So a component that a release adds in a new namespace also needs no change to the suite.recipeComponentsparses a recipe using the AICR version recorded in its plan's provenance, since recipes now come from two AICR releases.AICR_OPERATOR_E2E_AICR_VERSIONhad no other reader, so it is gone.rollOutToreplaces the approve-if-waiting loop indeploymentValidation's restore.followreuses it, because a transition that AICR assesses as safe needs no approval.Not in this PR: issue item 4, running this lane against
main's AICR before release day. It needs an AICR CLI image built frommain, which no workflow publishes. That follow-up is #3892. Release candidate tags already run the forward path days before GA.Testing
The suite runs on kind, not in
make test, so each scenario below was run locally on a fresh 2-node kind cluster (Kubernetes newest, pinned Argo CD, in-cluster registry).| Run | Upgrade path | Result |
|---|---|---|
| Forward, replaying the v1.3.0-rc3 failure:
PUBLISHED_VERSION=1.2.0 make operator-qualify-published, candidate built withCANDIDATE_AICR_*= v1.3.0 | v1.2.0 operator on AICR v1.1.2 → this branch on AICR v1.3.0, which addsnktp| 10/10 lifecycle subtests pass (4 fault scenarios skipped by design, as in CI) ||
make operator-qualify| both candidates on the pinned AICR v1.2.0 | 14/14 subtests pass || Removal:
PUBLISHED_VERSION=1.3.0 make operator-qualify-published, withhold_aicrdisabled for the run | v1.3.0 operator on AICR v1.3.0 → this branch on AICR v1.2.0, which lacksnktp| 10/10 pass (4 fault scenarios skipped by design) || Removal, with a local, uncommitted change that makes the suite wait for the stale
nktptoggle to stall resolution and hold the rollout before removing the toggles | same | 10/10 pass. Resolution stalled withAICRInvalidRequest ... unknown component "nktp", and the rollout was held (no step starts: AICRInvalidRequest). After the toggles went, it endedSucceededwith one sync. || The same stall without the pin, driven by hand with
kubectl| branch operator on AICR v1.2.0 | The held rollout still endsSucceededonce the toggles change. The whole-recipe plan then becomes the target, and a rollout to it waits for approval (Stalled=True AwaitingApproval). That is what the pin prevents. |In the forward run, AICR v1.3.0 resolved the kind recipe to 16 components, including
nktp. With all of them but cert-manager disabled, cert-manager renders as it did on v1.1.2, so the plan kept its digest and no follow-on rollout was needed. The rollback then pinned the active plan; the v1.2.0 operator resolved its own 15-component recipe without stalling, and the restored inputs resolved the active plan again.hold_aicrdecisions, checked against stub candidates:| Installed | Next | Result |
|---|---|---|
| v1.3.0 | v1.2.0 (the PR lane today) | both run v1.3.0 |
| v1.3.0 | v1.4.0-rc1 (a tag) | each runs its own |
| v1.3.0 | v1.3.0-rc3 | both run v1.3.0 (prerelease precedes its release) |
| v1.3.0-rc2 | v1.3.0-rc1 | both run v1.3.0-rc2 |
| v1.3.0 |
aicr.versionmissing | the run exits 1 |No Go package outside
tests/changes, so the coverage gate does not apply.Risk Assessment
Rollout notes: the PR lane
qualify-publishedkeeps running the published release's AICR on both sides until the.settings.yamlpin reaches the published release. The release gate moves AICR forward from the next tag on. A new recipe that breaks an upgrade on kind for some reason other than a changed component set will fail that gate, as v1.3.0-rc3 did. #3892 tracks catching that earlier.Checklist
make testwith-race)make lint)git commit -s -S)