{"record":{"id":"457682ac9d258fae","repo":"argoproj/argo-workflows","slug":"unable-to-parse-node-field-selector-s-w-457682","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/resume.go","lineNumber":57,"sourceCode":"`,\n\t\tArgs: func(cmd *cobra.Command, args []string) error {\n\t\t\tif len(args) == 0 && resumeArgs.nodeFieldSelector == \"\" {\n\t\t\t\treturn errors.New(\"requires either node field selector or workflow\")\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\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(resumeArgs.nodeFieldSelector)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"unable to parse node field selector '%s': %w\", resumeArgs.nodeFieldSelector, err)\n\t\t\t}\n\n\t\t\tfor _, wfName := range args {\n\t\t\t\t_, err := serviceClient.ResumeWorkflow(ctx, &workflowpkg.WorkflowResumeRequest{\n\t\t\t\t\tName:              wfName,\n\t\t\t\t\tNamespace:         namespace,\n\t\t\t\t\tNodeFieldSelector: selector.String(),\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"failed to resume %s: %w\", wfName, err)\n\t\t\t\t}\n\t\t\t\tfmt.Printf(\"workflow %s resumed\\n\", wfName)\n\t\t\t}\n\t\t\treturn nil\n\t\t},\n\t}\n\tcommand.Flags().StringVar(&resumeArgs.nodeFieldSelector, \"node-field-selector\", \"\", \"selector of node to resume, eg: --node-field-selector inputs.parameters.myparam.value=abc\")\n\treturn command","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/resume.go#L39-L75","documentation":"`argo resume` accepts --node-field-selector to resume only matching nodes; the value is parsed with fields.ParseSelector and rejected client-side with this wrapped error if invalid. This happens once before iterating over the workflow names in args.","triggerScenarios":"Running `argo resume` with a malformed --node-field-selector, e.g. `--node-field-selector 'displayName'` (missing '=value') or `--node-field-selector '=foo'`.","commonSituations":"Copy-pasting label-selector syntax (key in (v1,v2)) into a field selector; shell quoting stripping '='; typos like double '=='.","solutions":["Provide a valid key=value selector, e.g. --node-field-selector displayName=approve.","Remove the flag entirely to resume the whole workflow(s).","Quote the selector in the shell to preserve '=' characters."],"exampleFix":"// before\nargo resume my-wf --node-field-selector 'displayName in (approve)'\n// after\nargo resume my-wf --node-field-selector displayName=approve","handlingStrategy":"validation","validationCode":"if sel := resumeArgs.nodeFieldSelector; sel != \"\" {\n    if _, err := fields.ParseSelector(sel); err != nil {\n        return fmt.Errorf(\"bad selector %q: %w\", sel, err)\n    }\n}","typeGuard":"func isValidFieldSelector(s string) bool { _, err := fields.ParseSelector(s); return err == nil }","tryCatchPattern":"out, err := exec.Command(\"argo\", \"resume\", wf, \"--node-field-selector\", sel).CombinedOutput()\nif err != nil && strings.Contains(err.Error(), \"unable to parse node field selector\") {\n    // fall back to resuming whole workflow without selector\n}","preventionTips":["Use key=value field-selector syntax only.","Omit the flag to resume the entire workflow.","Quote selectors to protect '=' from the shell."],"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"}