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

Fix requeue warning introduced by controller-runtime #1090

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

matheuscscp
Copy link
Contributor

controller-runtime prints this info-level warning when a non-nil error is returned alongside a non-zero ctrl.Result:

if !result.IsZero() {
	log.Info("Warning: Reconciler returned both a non-zero result and a non-nil error. The result will always be ignored if the error is non-nil and the non-nil error causes reqeueuing with exponential backoff. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler")
}

This PR fixes the warning preserving the current behavior (returning the error, which is logged by controller-runtime).

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
@stefanprodan stefanprodan added the backport:release/v1.2.x To be backported to release/v1.2.x label Feb 21, 2024
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks @matheuscscp

@stefanprodan stefanprodan merged commit 5e0be40 into fluxcd:main Mar 8, 2024
7 checks passed
@fluxcdbot
Copy link
Member

Successfully created backport PR for release/v1.2.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:release/v1.2.x To be backported to release/v1.2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants