Migrate OnboardingController to SSA status updates#340
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Replace PatchHypervisorStatusWithRetry with Status().Apply(). The Nova ID lookup is inlined into Reconcile and combined with the initial condition in a single apply, avoiding two applies from the same field manager in one reconcile cycle which would cause SSA to prune the IDs. HypervisorID and ServiceID are included in every subsequent apply to retain ownership. The status config is built once at the top of Reconcile and threaded through to all sub-functions (abortOnboarding, initialOnboarding, smokeTest, completeOnboarding) which mutate it directly. An apply closure is also passed so each function calls apply() when it has determined the desired condition, rather than building and applying the config itself. The flow becomes fully declarative: compute desired state, then apply once. Seed only the condition owned by this controller (ConditionTypeOnboarding) so SSA does not claim ownership over conditions written by other controllers.
181d69b to
7d13627
Compare
|
Merging this branch will increase overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
Replace
PatchHypervisorStatusWithRetrywithStatus().Apply(). The Nova ID lookup is inlined intoReconcileand combined with the initial condition in a single apply, avoiding two applies from the same field manager in one reconcile cycle which would cause SSA to prune the IDs.HypervisorIDandServiceIDare included in every subsequent apply to retain ownership.The status config is built once at the top of
Reconcileand threaded through to all sub-functions (abortOnboarding,initialOnboarding,smokeTest,completeOnboarding) which mutate it directly. An apply closure is also passed so each function callsapply()when it has determined the desired condition, rather than building and applying the config itself. The flow becomes fully declarative: compute desired state, then apply once.Seed only the condition owned by this controller (
ConditionTypeOnboarding) so SSA does not claim ownership over conditions written by other controllers.Depends on #335 (
ssa-conditions-helpers).