argoproj/argo-workflows · error
InvalidArgument
InvalidArgument
Error message
unsupported requirement %s
What it means
BuildListOptions parses the list options' field selector; only a known allow-list of selectors (including the internally generated 'ext.showRemainingItemCount=...') is supported. Any unrecognized selector string is rejected with InvalidArgument rather than being silently ignored.
Source
Thrown at server/utils/list_options.go:154
minStartedAt, err = time.Parse(time.RFC3339, after)
if err != nil {
// startedAt is populated by us, it should therefore be valid.
return ListOptions{}, ToStatusError(err, codes.Internal)
}
} else if after, ok := strings.CutPrefix(selector, "spec.startedAt<"); ok {
maxStartedAt, err = time.Parse(time.RFC3339, after)
if err != nil {
// no need to use sutils here
return ListOptions{}, ToStatusError(err, codes.Internal)
}
} else if strings.HasPrefix(selector, "ext.showRemainingItemCount") {
showRemainingItemCount, err = strconv.ParseBool(strings.TrimPrefix(selector, "ext.showRemainingItemCount="))
if err != nil {
// populated by us, it should therefore be valid.
return ListOptions{}, ToStatusError(err, codes.Internal)
}
} else {
return ListOptions{}, ToStatusError(fmt.Errorf("unsupported requirement %s", selector), codes.InvalidArgument)
}
}
requirements, err := labels.ParseToRequirements(options.LabelSelector)
if err != nil {
return ListOptions{}, ToStatusError(err, codes.InvalidArgument)
}
return ListOptions{
Namespace: namespace,
Name: name,
NamePrefix: namePrefix,
NameFilter: nameFilter,
NamespaceFilter: namespaceFilter,
CreatedAfter: createdAfterTime,
FinishedBefore: finishedBeforeTime,
MinStartedAt: minStartedAt,
MaxStartedAt: maxStartedAt,
LabelRequirements: requirements,
Limit: limit,View on GitHub (pinned to 35bff19146)
Solutions
- Remove the unsupported field selector and filter client-side after listing.
- Use the supported selector keys exactly (case-sensitive, e.g. 'ext.showRemainingItemCount=true').
- Express the filter as a labelSelector instead, which goes through labels.ParseToRequirements.
- Check the server version's supported selector list; upgrade client and server together.
Example fix
// before opts.FieldSelector = "metadata.name=my-wf" // after opts.LabelSelector = "workflows.argoproj.io/name=my-wf"
Defensive patterns
Strategy: validation
Validate before calling
var supportedFieldSelectors = map[string]bool{"ext.showRemainingItemCount=": true}
func fieldSelectorSupported(fs string) bool {
for k := range supportedFieldSelectors {
if strings.HasPrefix(fs, k) {
return true
}
}
return fs == ""
} Try / catch
opts, err := utils.BuildListOptions(ctx, req, namespace)
if err != nil {
if status.Code(err) == codes.InvalidArgument && strings.Contains(err.Error(), "unsupported requirement") {
// fall back to listing without the selector and filter client-side
}
return err
} Prevention
- Only use selectors documented for Argo (the 'ext.' prefixed internal ones); prefer labelSelector for user filtering.
- Whitelist field selectors in client code before sending requests.
- Keep client SDK and server versions aligned; selector support can change.
When it happens
Trigger: Passing a fieldSelector containing an unknown key like 'metadata.name=foo' or a misspelled 'ext.showremainingitemcount=true' to BuildListOptions via the workflow list API/CLI.
Common situations: Copy-pasting kubectl-style field selectors that Argo does not implement; typos in the 'ext.' prefixed selectors; older client versions emitting selectors removed in a newer server.
Related errors
- successCondition, failureCondition and outputs are not suppo
- InvalidArgument
- duration has to be positive, current duration: %v
- containers must have at least one container
- containers%s
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/ff317e1aa732c994.
Report an issue: GitHub.