Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime: change reconcile and parse errors to warns #3691

Merged
merged 6 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions runtime/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ func (c *Controller) markPending(n *runtimev1.ResourceName) (skip bool, err erro
}
if !r.Meta.Hidden {
logArgs := []any{slog.String("name", n.Name), slog.String("kind", unqualifiedKind(n.Kind)), slog.Any("error", errCyclicDependency)}
c.Logger.Error("Skipping resource", logArgs...)
c.Logger.Warn("Skipping resource", logArgs...)
}
return true, nil
}
Expand Down Expand Up @@ -1350,7 +1350,7 @@ func (c *Controller) processCompletedInvocation(inv *invocation) error {
errorLevel = true
}
if errorLevel {
c.Logger.Error("Reconcile failed", logArgs...)
c.Logger.Warn("Reconcile failed", logArgs...)
} else if !inv.isHidden {
c.Logger.Info("Reconciled resource", logArgs...)
}
Expand Down
6 changes: 3 additions & 3 deletions runtime/reconcilers/project_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ func (r *ProjectParserReconciler) reconcileParser(ctx context.Context, inst *dri
if skipRillYAMLErr && e.FilePath == "/rill.yaml" {
continue
}
r.C.Logger.Error("Parser error", slog.String("path", e.FilePath), slog.String("err", e.Message))
r.C.Logger.Warn("Parser error", slog.String("path", e.FilePath), slog.String("err", e.Message))
}
} else if diff.Skipped {
r.C.Logger.Error("Not parsing changed paths due to broken rill.yaml")
r.C.Logger.Warn("Not parsing changed paths due to broken rill.yaml")
} else {
for _, e := range parser.Errors {
if slices.Contains(changedPaths, e.FilePath) {
r.C.Logger.Error("Parser error", slog.String("path", e.FilePath), slog.String("err", e.Message))
r.C.Logger.Warn("Parser error", slog.String("path", e.FilePath), slog.String("err", e.Message))
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (r *registryCache) restartController(iwc *instanceWithController) {
r.logger.Info("syncing repo", zap.String("instance_id", iwc.instance.ID))
err := r.ensureRepoSync(iwc.ctx, iwc.instance.ID)
if err != nil {
r.logger.Error("failed to sync repo", zap.String("instance_id", iwc.instance.ID), zap.Error(err))
r.logger.Warn("failed to sync repo", zap.String("instance_id", iwc.instance.ID), zap.Error(err))
// Even if repo sync failed, we'll start the controller
} else {
r.logger.Info("repo synced", zap.String("instance_id", iwc.instance.ID))
Expand Down