From d7a4f0ad01ba9232675de64d6866f2734d54082f Mon Sep 17 00:00:00 2001 From: Ewout Prangsma Date: Mon, 26 Mar 2018 14:13:47 +0200 Subject: [PATCH] Avoid overwriting Status updating the plan which is being executed --- pkg/deployment/reconcile/plan_executor.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/deployment/reconcile/plan_executor.go b/pkg/deployment/reconcile/plan_executor.go index 0fcbe323a..635c9b89d 100644 --- a/pkg/deployment/reconcile/plan_executor.go +++ b/pkg/deployment/reconcile/plan_executor.go @@ -64,6 +64,9 @@ func (d *Reconciler) ExecutePlan(ctx context.Context) (bool, error) { Msg("Failed to start action") return false, maskAny(err) } + // action.Start may have changed status, so reload it. + status = d.context.GetStatus() + // Update status according to result on action.Start. if ready { // Remove action from list status.Plan = status.Plan[1:] @@ -91,6 +94,8 @@ func (d *Reconciler) ExecutePlan(ctx context.Context) (bool, error) { return false, maskAny(err) } if ready { + // action.CheckProgress may have changed status, so reload it. + status = d.context.GetStatus() // Remove action from list status.Plan = status.Plan[1:] // Save plan update