From 44e8b373501f3835c1f39395fc0773433c0c24be Mon Sep 17 00:00:00 2001 From: Somtochi Onyekwere Date: Thu, 7 Dec 2023 15:07:58 +0100 Subject: [PATCH] log error Signed-off-by: Somtochi Onyekwere --- pkg/bootstrap/bootstrap_plain_git.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/bootstrap/bootstrap_plain_git.go b/pkg/bootstrap/bootstrap_plain_git.go index c8a1de04c4..473050fdb1 100644 --- a/pkg/bootstrap/bootstrap_plain_git.go +++ b/pkg/bootstrap/bootstrap_plain_git.go @@ -418,6 +418,7 @@ func (b *PlainGitBootstrapper) ReportKustomizationHealth(ctx context.Context, op err = fmt.Errorf("kustomization '%s' not ready: '%s'", objKey, readyCondition.Message) } } + b.logger.Failuref(err.Error()) return fmt.Errorf("error while waiting for Kustomization to be ready: '%s'", err) } b.logger.Successf("Kustomization reconciled successfully") @@ -446,9 +447,10 @@ func (b *PlainGitBootstrapper) ReportGitRepoHealth(ctx context.Context, options if errors.Is(err, context.DeadlineExceeded) { readyCondition := apimeta.FindStatusCondition(g.Status.Conditions, meta.ReadyCondition) if readyCondition != nil && readyCondition.Status != metav1.ConditionTrue { - return fmt.Errorf("gitrepository '%s' not ready: '%s'", objKey, readyCondition.Message) + err = fmt.Errorf("gitrepository '%s' not ready: '%s'", objKey, readyCondition.Message) } } + b.logger.Failuref(err.Error()) return fmt.Errorf("error while waiting for gitrepository to be ready: '%s'", err) } b.logger.Successf("GitRepsoitory reconciled successfully")