Skip to content

Commit 0dc4343

Browse files
bdchathamclaude
andcommitted
fix: prevent templateHash from advancing during active rollout
updateStatus was overwriting templateHash when PlanInProgress was false, even if RolloutInProgress was true. This caused a race: detectDeploymentNeeded would set RolloutInProgress, but before reconcilePlan could build the plan, updateStatus would advance the hash, and on the next reconcile no divergence would be detected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f2e9559 commit 0dc4343

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

internal/controller/nodedeployment/status.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ func (r *SeiNodeDeploymentReconciler) updateStatus(ctx context.Context, group *s
3030
})
3131
}
3232

33-
// Update ObservedGeneration and TemplateHash when no plan is active.
34-
// During plan execution, ObservedGeneration is updated by completePlan.
35-
if !hasConditionTrue(group, seiv1alpha1.ConditionPlanInProgress) {
33+
// Update ObservedGeneration and TemplateHash when no rollout or plan is active.
34+
// During rollout/plan execution, these are updated by completePlan.
35+
if !hasConditionTrue(group, seiv1alpha1.ConditionPlanInProgress) &&
36+
!hasConditionTrue(group, seiv1alpha1.ConditionRolloutInProgress) {
3637
group.Status.ObservedGeneration = group.Generation
3738
group.Status.TemplateHash = templateHash(&group.Spec.Template.Spec)
3839
}

0 commit comments

Comments
 (0)