-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: disable write back informer by default #15079
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
Changes from all commits
7a6f681
ccc9484
37f1465
e05a4d0
a41afb7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| Description: Disable write back informer by default | ||
| Author: [Eduardo Rodrigues](https://github.com/eduardodbr) | ||
| Component: General | ||
| Issues: 12352 | ||
|
|
||
| Update the controller’s default behavior to disable the write-back informer. We’ve seen several cases of unexpected behavior that appear to be caused by the write-back mechanism, and Kubernetes docs recommend avoiding writes to the informer store. Although turning it off may increase the frequency of 409 Conflict errors, it should help reduce unpredictable controller behavior. | ||
|
|
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -798,14 +798,15 @@ func (woc *wfOperationCtx) persistUpdates(ctx context.Context) { | |||||||
| woc.log.WithFields(logging.Fields{"resourceVersion": woc.wf.ResourceVersion, "phase": woc.wf.Status.Phase}).Info(ctx, "Workflow update successful") | ||||||||
|
|
||||||||
| switch os.Getenv("INFORMER_WRITE_BACK") { | ||||||||
| // By default we write back (as per v2.11), this does not reduce errors, but does reduce | ||||||||
| // this does not reduce errors, but does reduce | ||||||||
| // conflicts and therefore we log fewer warning messages. | ||||||||
|
Comment on lines
+801
to
802
|
||||||||
| // this does not reduce errors, but does reduce | |
| // conflicts and therefore we log fewer warning messages. | |
| // Writing back to the informer does not reduce errors, but does reduce conflicts and therefore we log fewer warning messages. |
Copilot
AI
Dec 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 808 starts with lowercase and lacks proper sentence structure. Consider revising to: "No longer write back to informer cache as default (as per v4.0)."
| // no longer write back to informer cache as default (as per v4.0) | |
| // No longer write back to informer cache as default (as per v4.0). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra trailing space after
falsein the default value column. This should be removed for consistency with other entries in the table.