fix(ops): preserve resolved component context in switchover - #10568
Conversation
|
Auto Cherry-pick Instructions CLA Recheck Instructions |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10568 +/- ##
==========================================
+ Coverage 65.57% 65.64% +0.07%
==========================================
Files 510 510
Lines 64186 64171 -15
==========================================
+ Hits 42088 42125 +37
+ Misses 18354 18310 -44
+ Partials 3744 3736 -8
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:
|
|
PR #10568 patch-version runtime validation completed on the Valkey CT09 scene. Controller image gate:
Same frozen OpsRequest repair result:
Minimum clean CT09 contrast:
Evidence packet path on the test machine: Packet SHA256SUMS hash: Boundary: this validates PR #10568 patch-version CT09 scope only. It is not a full Valkey r9 or release-ready result. |
|
[P2] The functional fix removes the duplicate component resolution, but the replacement expands the OpsRuntime boundary to a controller-internal type. The merge base kept Passing the already resolved concrete shard is the correct direction, but please pass a minimal stable switchover/action context instead of exposing the complete synthesized controller model through the OpsRuntime interface. |
|
Addressed the runtime-boundary review on exact head The sharded target is still resolved once by the switchover handler, but TDD/gates:
The PR remains Draft pending exact-head CI and review verification. Runtime N=0; this is source/local contract evidence only. |
|
/nopick |
|
Scope disclosure added: this change intentionally fixes TemplateVars propagation as well as sharded target resolution. The handler resolves variables before dispatch; the old runtime rebuild skipped that resolver, while the new action context passes the resolved map into lifecycle.New. Runtime evidence is still N=0. |
|
Landing-order note: #10651 fixes an observed non-idempotent switchover replay window and touches the same |
984982c to
95b4972
Compare
|
/approve |
Problem
Fixes #10567.
handleSwitchoveralready builds the concrete targetSynthesizedComponentand resolves its ComponentDefinition TemplateVars before dispatching the lifecycle action. However,opsRuntime.Switchoverdiscarded that resolved component and built it again. BecauseBuildSynthesizedComponentdoes not resolve TemplateVars, the lifecycle action received a new synthesized component without the resolved values produced byhandleSwitchover.The confirmed root cause is the loss of the already resolved component context. Component-name recomposition from a sharding spec name is not part of this fix.
Change
buildSynthesizedCompByCompNameand the redundant third synthesized-component build.*component.SynthesizedComponentdirectly fromhandleSwitchovertoopsRuntime.Switchover.opsRuntime.dataContext(),dataListOpts, andGetInstanceso data-plane and multi-cluster behavior is unchanged.Preserved behavior
Tests
pkg/controller/lifecyclefull suite: PASSpkg/operationsswitchover suite: PASSpkg/operationsfull suite: PASSgit diff --check: PASSThe switchover coverage verifies:
ResolveTemplateNEnvVarsreaches the finalActionRequest;