Skip to content

Commit

Permalink
fix(reconciler): don't update status if outputs are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
metral committed Jul 24, 2020
1 parent 5d74ade commit 271c098
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/stack/stack_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ func (r *ReconcileStack) Reconcile(request reconcile.Request) (reconcile.Result,
reqLogger.Error(err, "Failed to get Stack outputs", "Stack.Name", stack.Stack)
return reconcile.Result{}, err
}
if outs == nil {
reqLogger.Info("Stack outputs are empty. Skipping status update", "Stack.Name", stack.Stack)
return reconcile.Result{}, nil
}
err = sess.getLatestResource(instance, request.NamespacedName)
if err != nil {
sess.logger.Error(err, "Failed to get latest Stack to update successful Stack status", "Stack.Name", instance.Spec.Stack)
Expand Down

0 comments on commit 271c098

Please sign in to comment.