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

small reconciler bug (result + error returned) when error occurred #661

Open
applike-ss opened this issue Nov 4, 2024 · 0 comments
Open

Comments

@applike-ss
Copy link

Hello,

It seems that the image-reflector-controllers reconciler is always returning the result and error object without checking whether the error is not nil.
I do see these messages upon error:

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

I suggest to change this:

to something like this:

if retErr != nil {
  return nil, retErr
}

return result, nil

Same can be applied for the imagepolicy controller:

There might be other flux components doing the same, but I didn't check them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant