Skip to content

Commit

Permalink
error->info when logging missing observed start time annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
nimakaviani committed Jan 31, 2024
1 parent 7497b6e commit c21900c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/controllers/localbuild/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ func (r *LocalbuildReconciler) reconcileEmbeddedApp(ctx context.Context, appName
}

func (r *LocalbuildReconciler) shouldShutDown(ctx context.Context, resource *v1alpha1.Localbuild) (bool, error) {
logger := log.FromContext(ctx)

if !r.ExitOnSync {
return false, nil
}
Expand All @@ -231,7 +233,8 @@ func (r *LocalbuildReconciler) shouldShutDown(ctx context.Context, resource *v1a

observedTime, gErr := util.GetLastObservedSyncTimeAnnotationValue(repo.ObjectMeta.Annotations)
if gErr != nil {
return false, gErr
logger.Info(gErr.Error())
return false, nil
}

if !repo.Status.Synced || cliStartTime != observedTime {
Expand All @@ -254,7 +257,8 @@ func (r *LocalbuildReconciler) shouldShutDown(ctx context.Context, resource *v1a

observedTime, gErr := util.GetLastObservedSyncTimeAnnotationValue(pkg.ObjectMeta.Annotations)
if gErr != nil {
return false, gErr
logger.Info(gErr.Error())
return false, nil
}

if !pkg.Status.Synced || cliStartTime != observedTime {
Expand Down

0 comments on commit c21900c

Please sign in to comment.