fix(operations): read switchover dispatch messages#10681
Conversation
|
Auto Cherry-pick Instructions CLA Recheck Instructions |
|
The only current PR Pre-Check failure is the issue-link check. The body contains This is a release-branch workflow limitation, not a source failure in this patch. The issue and exact head remain linked in the PR body; I am leaving the PR title and base accurate rather than bypassing the check with a |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.1 #10681 +/- ##
===============================================
+ Coverage 53.02% 53.13% +0.10%
===============================================
Files 545 545
Lines 60988 61080 +92
===============================================
+ Hits 32340 32453 +113
+ Misses 25521 25499 -22
- Partials 3127 3128 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| const ( | ||
| KBSwitchoverKey = "Switchover" | ||
| KBSwitchoverKey = "Switchover" | ||
| switchoverDispatchClaimMessagePrefix = "switchover dispatch claimed before lifecycle call: SwitchoverDispatch/" |
There was a problem hiding this comment.
[P1] Do not establish the cross-version dispatch protocol through ProgressStatusDetail.Message. The API defines Message as a human-readable explanation, but this reader treats exact text prefixes as state, version, request identity, and token. A later wording change becomes an unknown legacy message; for a switchover without a candidate, the default legacy branch can even interpret that unknown outcome as success. Dispatch state must use an explicit, versioned status API shared by the main writer and release readers, while Message remains display-only.
Problem
The current-line switchover writer will record a durable dispatch claim and outcome in the existing per-instance progress message before or after the non-idempotent lifecycle call. A release-1.1 rollback reader must understand those messages without replaying the action or inventing success.
Two compatibility paths also need to remain distinct:
The broken edge was that a rollback reader could either miss the writer's logical key or treat old and new message formats as the same state. That can leave an item stuck or re-enter the legacy dispatch path incorrectly.
Fixes #10671.
What changes
This is a reader-only compatibility backport. It does not create dispatch claims or outcomes and does not change the API or CRD.
ComponentObjectNameis present does the reader fall back to the older object-name status key.Rollout boundary
Release-1.0 and release-1.1 readers must be published before the current-line writer is activated. Before writer activation, operators must also inspect and clear any legacy object-key Pending items because those intentionally retain the old action-before-status behavior.
This PR is not an activation or release-ready claim.
Validation
Exact head:
f5312a323116d01217b53fa469878c224fa181dcTree:
1ce561189fa8c1924ec7f339299be53b1ac0d709pkg/operationsfull PASS;The interrupted full
make check-diffrun is not reported as PASS. The exact changed-package and static gates above are green. Runtime validation is N=0.