From 909549f056fa22172a8de620d834569ae7a5b9c8 Mon Sep 17 00:00:00 2001 From: William Petit Date: Sat, 1 Apr 2023 19:44:00 +0200 Subject: [PATCH] feat(agent): do not block execution of controllers on error --- internal/agent/agent.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/agent/agent.go b/internal/agent/agent.go index a9a7d87..eccc791 100644 --- a/internal/agent/agent.go +++ b/internal/agent/agent.go @@ -44,8 +44,6 @@ func (a *Agent) Run(ctx context.Context) error { if err := a.registerAgent(ctx, client, state); err != nil { logger.Error(ctx, "could not register agent", logger.E(errors.WithStack(err))) - - return } logger.Debug(ctx, "state before reconciliation", logger.F("state", state)) @@ -81,7 +79,7 @@ func (a *Agent) Reconcile(ctx context.Context, state *State) error { ) if err := ctrl.Reconcile(ctrlCtx, state); err != nil { - return errors.WithStack(err) + logger.Error(ctx, "could not reconcile", logger.E(errors.WithStack(err))) } }