fix: guard upgrade dispatch during teardown and emit observations #8057
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)).
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.02 · 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.344
Real PR Conversation Timeline
1 comments
"Review active on #8057"
general
weight: 0.35
shubhadapaithankar
Why
The RP must not dispatch another control-plane upgrade policy once deletion or
CS uninstallation is observed. Reliable version/lifecycle observations are also
needed before reviewing a replacement for version-specific upgrade alerting.
This is the backend-only Phase 1 of
ARO-30519, extracted from
Azure/ARO-HCP#7982 onto a clean
main-based branch. The complete earlier implementation is preserved separately.What changes
status-only CS-uninstalling check on the shared y-stream/z-stream trigger.
establish a dispatch candidate. Local RP and dispatched-CS deletion
timestamps independently block without any CS call.
not couple converged/no-work reconciliations to CS availability.
dispatch candidate revalidates it and can recover from a spurious/obsolete
observation when no local deletion timestamp is present.
observation, and True is persisted only to recover an existing SPC condition.
while preserving the existing per-version metric contract.
are logged/counted, valid rows remain available and expected totals include
malformed entries rather than falsely reporting a complete subset.
retain the deployed legacy version metric's original label contract.
deletion_confirmedlabel.to one summary per five minutes while exporting the exact invalid count.
synchronization limits and exporter-lifetime cardinality/churn.
No public ARM API fields are added.
What deliberately does not change
Azure/ARO-HCP#8004 remains intact.
policy or the definition of ARM operation completion.
Duplicate version-specific upgrade IcMs are not resolved by this phase alone.
Phase 2 will review the recording-state policy and alert/IcM consumer together.
ARO-30662 tracks later cutover.
Safety boundary
These checks prevent new RP policy dispatch after teardown is observed.
They do not cancel accepted/running policies. A CS lifecycle read and a policy
POST are not atomic; CS must enforce admission/execution during concurrent
uninstallation too.
Verification
go test -C backend -p 2 ./pkg/controllers/... -count=1passes.go test -C internal -p 2 ./api/... ./azureapi/... -count=1passes,including all internal persistence/deepcopy and public-version conversion tests.
The round-trip fuzzer excludes the new internal-only observation like other
server-only fields; no public ARM conversion property is introduced.
make lintpasses with zero issues.make -k verifypasses, including complete shared generation and bothdeepcopy/generation guards, materialization, formatting and repository checks.
make vendorandmake verify-vendorpass for both vendor trees. The existinggolang.org/x/timeversion is now a direct backend requirement; no vendoredbytes or dependency versions change.
last-observation/dispatch regressions.
generated rules, routing, configuration and generator tooling remain identical.
After approved SDP deployment, collect seven usable days of observation data
and check coverage, snapshot consistency, lifecycle visibility, polling load and
series churn. This is observation validation, not proof of an undeployed
stateful monitor. Raw telemetry/caches are not committed to this PR.
No environment deployment, customer mutation or incident update was performed.
External CI limitation
The reported podman-integration failure is in Cosmos emulator TLS setup
(
self-signed certificate in certificate chain), before the changed observationlogic can be exercised. It is reported as a pre-existing infrastructure issue;
this change does not disable TLS checks or modify emulator certificates, and
that integration job has not been claimed as fixed.
Documentation: cluster-upgrade observation contract.