{"record":{"id":"ce4bef5f2986951e","repo":"argoproj/argo-workflows","slug":"unable-to-parse-node-field-selector-s-w-ce4bef","errorCode":null,"errorMessage":"unable to parse node field selector '%s': %w","messagePattern":"unable to parse node field selector '(.+?)': %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/node.go","lineNumber":74,"sourceCode":"\t\t\t\t}\n\t\t\t\tres, err := json.Marshal(outputParams)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"unable to parse output parameter set request: %w\", err)\n\t\t\t\t}\n\t\t\t\toutputParameters = string(res)\n\t\t\t}\n\n\t\t\tctx := cmd.Context()\n\t\t\tctx, apiClient, err := client.NewAPIClient(ctx)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tserviceClient := apiClient.NewWorkflowServiceClient(ctx)\n\t\t\tnamespace := client.Namespace(ctx)\n\n\t\t\tselector, err := fields.ParseSelector(setArgs.nodeFieldSelector)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to parse node field selector '%s': %w\", setArgs.nodeFieldSelector, err)\n\t\t\t}\n\n\t\t\t_, err = serviceClient.SetWorkflow(ctx, &workflowpkg.WorkflowSetRequest{\n\t\t\t\tName:              args[1],\n\t\t\t\tNamespace:         namespace,\n\t\t\t\tNodeFieldSelector: selector.String(),\n\t\t\t\tMessage:           setArgs.message,\n\t\t\t\tPhase:             setArgs.phase,\n\t\t\t\tOutputParameters:  outputParameters,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfmt.Printf(\"workflow values set\\n\")\n\t\t\treturn nil\n\t\t},\n\t}\n\tcommand.Flags().StringVar(&setArgs.nodeFieldSelector, \"node-field-selector\", \"\", \"Selector of node to set, eg: --node-field-selector inputs.parameters.myparam.value=abc\")","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/node.go#L56-L92","documentation":"The `argo node set` command requires --node-field-selector to identify which node to modify; it is parsed with k8s.io/apimachinery fields.ParseSelector. If the selector string is not a valid comma-separated key=value (or key==value / key!=value) field selector, this error wraps the underlying parse error.","triggerScenarios":"Running `argo node set` with a malformed --node-field-selector such as `displayName` (no '='), `=approve` (empty key), or invalid escaping, e.g. `--node-field-selector 'displayName'`.","commonSituations":"Forgetting the =value part; quoting mistakes in shell that drop '='; using unsupported syntax like label-selector operators (in/exists) which fields.ParseSelector rejects.","solutions":["Use key=value form, e.g. --node-field-selector displayName=approve or inputs.parameters.myparam.value=abc.","Escape special characters and quote the whole selector in the shell.","Omit spaces around '=' (ParseSelector is strict about format)."],"exampleFix":"// before\nargo node set my-wf --node-field-selector displayName --message \"hi\"\n// after\nargo node set my-wf --node-field-selector displayName=approve --message \"hi\"","handlingStrategy":"validation","validationCode":"sel := \"displayName=approve\"\nif _, err := fields.ParseSelector(sel); err != nil {\n    return fmt.Errorf(\"invalid --node-field-selector %q: %w\", sel, err)\n}","typeGuard":"func isValidFieldSelector(s string) bool { _, err := fields.ParseSelector(s); return err == nil }","tryCatchPattern":"err := cmd.Run()\nif err != nil && strings.Contains(err.Error(), \"unable to parse node field selector\") {\n    log.Fatalf(\"fix --node-field-selector syntax (key=value): %v\", err)\n}","preventionTips":["Always use key=value form for --node-field-selector.","Do not use label-selector operators (in/exists) here.","Quote selectors in shell scripts to preserve '='."],"tags":["cli","argo-cli","field-selector","validation"],"backgroundTag":"invalid-field-selector","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}