Skip to content

Failure to apply finalizer on GitRepository CRs #357

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

Closed
cjnosal opened this issue May 6, 2021 · 1 comment · Fixed by #586
Closed

Failure to apply finalizer on GitRepository CRs #357

cjnosal opened this issue May 6, 2021 · 1 comment · Fixed by #586

Comments

@cjnosal
Copy link

cjnosal commented May 6, 2021

Some CRs occasionally get stuck in a reconciling status and the source-controller logs

{"level":"error","ts":"2021-05-06T16:43:38.163Z","logger":"controller.gitrepository","msg":"Reconciler error","reconciler group":"source.toolkit.fluxcd.io","reconciler kind":"GitRepository","name":"myrepo-gitrepository","namespace":"myns","error":"Operation cannot be fulfilled on gitrepositories.source.toolkit.fluxcd.io \"myrepo-gitrepository\": the object has been modified; please apply your changes to the latest version and try again"}

The finalizer is added/removed via r.Update calls that fail if the object has been changed (we have another CI component that updates the spec fields). Changing these calls to use r.Patch (following the approach used in #202 ) appears to fix the problem.

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

Successfully merging a pull request may close this issue.

1 participant