Repository navigation
Description
Implementation status: Implemented in draft #397. After restacking #395, controller suites passed with 1.35.0 and 1.37.0 envtest assets. Original full make check ENVTEST_K8S_VERSION=1.34.0 results predate the rolling support policy and do not define the current floor. The issue stays open until the lifecycle bundle is complete and merged.
Delivery bundle: B: Lifecycle correctness and status. See #397 and #368 for the four-PR stack.
Parent: #391
Roadmap: #368
Plan item: PR-01
Priority: P1
Dependencies: None
Kubernetes support: Rolling upstream-maintained minors; use the oldest/newest boundaries pinned in config/kubernetes-versions.env. See #368 for the current policy. Unrun jobs are not passed validation.
Problem Statement
Evidence: controllers/cruisecontroloperation_controller.go:246-257 replaces a status conflict with the subsequent read result. A successful read therefore ends the retry without persisting the external execution result.
Proposed Solution
Files: controllers/cruisecontroloperation_controller.go, controllers/cruisecontroloperation_controller_test.go, controllers/tests/cruisecontroloperation_controller_test.go; use pkg/util/util.go only if an existing retry utility must change.
Interface contract: Keep Reconcile(context.Context, ctrl.Request) (ctrl.Result, error). A successful return from the persistence path means the submitted task result has been stored, not merely fetched. Retain the immutable execution result across retries and use fresh reads for conflict recovery.
- Add
TestOperationResultPersistsAcrossStatusConflicts: first status write conflicts, refresh succeeds, second write succeeds; assert write attempts, persisted task identity/response, and one external submission. Also cover retry history, stop-operation selection, and replaced/removed/newer tasks. - Add its
exhausted_conflicts_return_errorsubtest: exhausted writes return an error and never claim persistence succeeded. A Go build overlay verified failure against baseline production code without modifying the implementation worktree. - Implement a complete read-modify-write retry. Do not replace the original write failure with successful refresh, and do not resubmit external work inside the persistence retry.
- Characterize the separate submit-then-crash window in
docs/monitoring.md: recorded IDs support querying progress; automatic adoption of an unrecorded submission is not implemented. This does not supply exactly-once execution. - Validate
go test ./controllers/... -timeout 10mwith Kubernetes 1.34 envtest assets, plus finalmake check ENVTEST_K8S_VERSION=1.34.0. Run the full suites rather than the earlier proposed focus string, which need not match all existing operation spec names.
Done when: Fault-injected conflicts cannot silently discard a successful execution result.
Delivery: Four consolidated PRs, approved November 16, 2026: A -> B -> C; D branches from A. Foundation is #395. The 22 PR-XX identifiers are work-item IDs, not separate PRs. Preserve every work-item acceptance criterion and native dependency. No gated experiment is automatically enabled, and no issue is complete merely because one PR references it. D must satisfy its native #375 gate, including lifecycle-domain signals assigned to B; branching from A does not waive that merge prerequisite. Write focused regression tests first; record exact commands/results and run make check plus this issue's real-cluster/measurement gates.
Alternatives Considered
Twenty-two individual PRs add unnecessary integration overhead, while one omnibus PR obscures correctness and rollout boundaries. Deliver this scope in its approved dependency-aligned bundle. Do not expand into deferred consistency, storage, or concurrency changes without their own decision gates.
Additional Context
Baseline: 95138e0d; detailed roadmap scope: #368, section PR-01. The roadmap #368 and its native sub-issues are the planning source of truth. No planning document is committed in the final PR diffs. Re-read affected source and overlapping work before implementation. Historical baseline test passes are not validation of this change.
Related historical context: #301 (closed) covers Cruise Control restart races. Preserve its resolution and avoid duplicating that narrower fix.
Activity
fix(controllers): persist Cruise Control results through status confl…
fix(controllers): persist Cruise Control results through status confl…
fix(controllers): persist Cruise Control results through status confl…
perf(controllers): refresh Cruise Control results only on conflict
amuraru commentedon Nov 17, 2026
Superseded by #391 under the reduced roadmap #368. The persistence fix is in open PR #397 (including f022f61), not merged. Closing this tracking item does not declare implementation complete.
fix(controllers): persist Cruise Control results through status confl…
perf(controllers): refresh Cruise Control results only on conflict