Skip to content

Commit

Permalink
Avoid overwriting Status updating the plan which is being executed
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoutp committed Mar 26, 2018
1 parent e7bf5e7 commit d7a4f0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/deployment/reconcile/plan_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d7a4f0a

Please sign in to comment.