← Back to Pull requests

Allow nodepool version downgrades for HCP clusters #5184

Closed
unknown closed this pull request without merging on Jun 02, 2026 11:04 UTC
View on GitHub
unknown unknown commented on May 07, 2026 20:33 UTC
Author

Fixes: ARO-26792
(updated)

### What

Allow nodepool version downgrades for HCP clusters. Constraints:
- Same-major downgrades allowed within N-2 minor version skew of control plane
- Cross-major downgrades gated under FeatureExperimentalReleaseFeatures AFEC
- Upgrades skip minor versions (on ARO-26793); downgrades can (N-2 provides the bound)

An E2E test exercises a z-stream downgrade as the simplest no-edge scenario.

Per @deads2k suggestion, this work is split into two PRs:
1. Remove edge requirement, keep version existence check (PR #5153)
2. (this PR) Allow nodepool version downgrades

### Why

HCP nodepools use the Replace upgrade strategy — nodes are destroyed and recreated
at the target version, not upgraded in-place. A "downgrade" is operationally identical
to an "upgrade" (both replace nodes). The previous restriction blocked valid rollback
scenarios.

Cincinnati graphs have no backward edges, so a downgrade is guaranteed to have no
Cincinnati upgrade path. This makes downgrade the simplest proof that the no-edge
scenario works end-to-end.

### Testing

- Unit tests (validators_test.go, admit_nodepool_test.go,
nodepool_version_controller_test.go): z-stream downgrade, y-stream downgrade,
multi-minor downgrade within N-2, downgrade at N-2 boundary, downgrade beyond N-2
fails, cross-major downgrade ±AFEC, y-stream upgrade without Cincinnati edge (AC2).
- Integration tests: downgrade beyond N-2 skew returns "must be within 2 minor
versions" error.
- E2E: New test creates a nodepool at the latest 4.21.z patch and downgrades to
the previous patch. Verifies nodes are recreated at the target version and the ARM
GET reflects the downgraded version.

### Special notes for your reviewer

Dependencies:
- [DONE] CS MR !326
- [DONE] PR #5153 (1/2) — removes Cincinnati
edge requirement, keeps existence check
- [DONE] CS MR !326
— skips downgrade and cross-major validation in CS for ARO HCP. Without this, the
E2E downgrade test will fail.

Diff: 308 lines (+231 / -77) across 3 files Reviewer: JameelB Review duration: 36871m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 308 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.343
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5184"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.2% (MEDIUM) · Higher = larger blast radius
40.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.9% · Safe to merge
15.9%
Repository