Skip to content

[V2] Fix CRD update conflict error#7181

Merged
popojk merged 1 commit intov2from
fix_cr_conflict_error
Apr 13, 2026
Merged

[V2] Fix CRD update conflict error#7181
popojk merged 1 commit intov2from
fix_cr_conflict_error

Conversation

@popojk
Copy link
Copy Markdown
Contributor

@popojk popojk commented Apr 9, 2026

Tracking issue

Why are the changes needed?

We sometimes see this error while running a workflow, which caused by k8s optimistic lock when 2 reconcile loops trying to update the same CRD: Screenshot 2026-04-09 at 12 23 45 PM

What changes were proposed in this pull request?

Actually the error is gonna hurt, as the controller will reconcile again when an error returned. But a more elegant way to handle this is to handle conflict by using the k8s library retry.RetryOnConflict

How was this patch tested?

I ran the workflow for 10 times, the conflict error was not showing again.

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@github-actions github-actions bot mentioned this pull request Apr 9, 2026
3 tasks
@pingsutw pingsutw added this to the V2 GA milestone Apr 10, 2026
@popojk popojk merged commit 668913c into v2 Apr 13, 2026
20 checks passed
@popojk popojk deleted the fix_cr_conflict_error branch April 13, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants