Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion workflow/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,10 @@ func (wfc *WorkflowController) tweakListRequestListOptions(options *metav1.ListO
options.LabelSelector = labelSelector.String()
// `ResourceVersion=0` does not honor the `limit` in API calls, which results in making significant List calls
// without `limit`. For details, see https://github.com/argoproj/argo-workflows/pull/11343
options.ResourceVersion = ""
// Check if ResourceVersion is "0" and reset it to empty string to ensure proper pagination behavior
if options.ResourceVersion == "0" {
options.ResourceVersion = ""
}
}

func (wfc *WorkflowController) tweakWatchRequestListOptions(options *metav1.ListOptions) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func NewTolerantClusterWorkflowTemplateInformer(dynamicInterface dynamic.Interfa
return &tolerantClusterWorkflowTemplateInformer{delegate: dynamicinformer.NewFilteredDynamicSharedInformerFactory(dynamicInterface, defaultResync, "", func(options *metav1.ListOptions) {
// `ResourceVersion=0` does not honor the `limit` in API calls, which results in making significant List calls
// without `limit`. For details, see https://github.com/argoproj/argo-workflows/pull/11343
options.ResourceVersion = ""
// Check if ResourceVersion is "0" and reset it to empty string to ensure proper pagination behavior
if options.ResourceVersion == "0" {
options.ResourceVersion = ""
}
}).ForResource(schema.GroupVersionResource{Group: workflow.Group, Version: workflow.Version, Resource: workflow.ClusterWorkflowTemplatePlural})}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ func NewTolerantWorkflowTemplateInformer(dynamicInterface dynamic.Interface, def
return &tolerantWorkflowTemplateInformer{delegate: dynamicinformer.NewFilteredDynamicSharedInformerFactory(dynamicInterface, defaultResync, namespace, func(options *metav1.ListOptions) {
// `ResourceVersion=0` does not honor the `limit` in API calls, which results in making significant List calls
// without `limit`. For details, see https://github.com/argoproj/argo-workflows/pull/11343
options.ResourceVersion = ""
// Check if ResourceVersion is "0" and reset it to empty string to ensure proper pagination behavior
if options.ResourceVersion == "0" {
options.ResourceVersion = ""
}
}).ForResource(schema.GroupVersionResource{Group: workflow.Group, Version: workflow.Version, Resource: workflow.WorkflowTemplatePlural})}
}

Expand Down
5 changes: 4 additions & 1 deletion workflow/controller/taskresult.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ func (wfc *WorkflowController) newWorkflowTaskResultInformer(ctx context.Context
options.LabelSelector = labelSelector
// `ResourceVersion=0` does not honor the `limit` in API calls, which results in making significant List calls
// without `limit`. For details, see https://github.com/argoproj/argo-workflows/pull/11343
options.ResourceVersion = ""
// Check if ResourceVersion is "0" and reset it to empty string to avoid missing watch event.
if options.ResourceVersion == "0" {
options.ResourceVersion = ""
}
},
)
//nolint:errcheck // the error only happens if the informer was stopped, and it hasn't even started (https://github.com/kubernetes/client-go/blob/46588f2726fa3e25b1704d6418190f424f95a990/tools/cache/shared_informer.go#L580)
Expand Down
Loading