From 271c09838d03f10cdd69c4971e778d8295716aa3 Mon Sep 17 00:00:00 2001 From: Mike Metral <1112768+metral@users.noreply.github.com> Date: Fri, 24 Jul 2020 13:40:40 +0000 Subject: [PATCH] fix(reconciler): don't update status if outputs are empty --- pkg/controller/stack/stack_controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controller/stack/stack_controller.go b/pkg/controller/stack/stack_controller.go index 8b23fa6d..f6717702 100644 --- a/pkg/controller/stack/stack_controller.go +++ b/pkg/controller/stack/stack_controller.go @@ -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)