{"record":{"id":"7d8811240e9b13ac","repo":"argoproj/argo-workflows","slug":"expected-annotations-of-the-form-name1-value2-nam","errorCode":null,"errorMessage":"expected Annotations of the form: NAME1=VALUE2,NAME2=VALUE2. Received: %s: %w","messagePattern":"expected Annotations of the form: NAME1=VALUE2,NAME2=VALUE2\\. Received: (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/util/util.go","lineNumber":287,"sourceCode":"\tif wfLabels == nil {\n\t\twfLabels = make(map[string]string)\n\t}\n\tif opts.Labels != \"\" {\n\t\tpassedLabels, err := cmdutil.ParseLabels(opts.Labels)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"expected labels of the form: NAME1=VALUE2,NAME2=VALUE2. Received: %s: %w\", opts.Labels, err)\n\t\t}\n\t\tmaps.Copy(wfLabels, passedLabels)\n\t}\n\twf.SetLabels(wfLabels)\n\twfAnnotations := wf.GetAnnotations()\n\tif wfAnnotations == nil {\n\t\twfAnnotations = make(map[string]string)\n\t}\n\tif opts.Annotations != \"\" {\n\t\tpassedAnnotations, err := cmdutil.ParseLabels(opts.Annotations)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"expected Annotations of the form: NAME1=VALUE2,NAME2=VALUE2. Received: %s: %w\", opts.Labels, err)\n\t\t}\n\t\tmaps.Copy(wfAnnotations, passedAnnotations)\n\t}\n\twf.SetAnnotations(wfAnnotations)\n\terr := overrideParameters(wf, opts.Parameters)\n\tif err != nil {\n\t\treturn err\n\t}\n\terr = overrideArtifacts(wf, opts.Artifacts)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif opts.GenerateName != \"\" {\n\t\twf.GenerateName = opts.GenerateName\n\t}\n\tif opts.Name != \"\" {\n\t\twf.Name = opts.Name\n\t}","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/util/util.go#L269-L305","documentation":"ApplySubmitOpts parses opts.Annotations with cmdutil.ParseLabels (same NAME=VALUE,NAME=VALUE syntax as labels). If parsing fails, the error is wrapped as 'expected Annotations of the form...'. Note the message interpolates opts.Labels instead of opts.Annotations — a small upstream bug, but the trigger is malformed opts.Annotations.","triggerScenarios":"argo submit --annotations with a malformed value (missing '=', invalid characters) — ParseLabels returns an error which is wrapped with this message while passing opts.Labels into the message text.","commonSituations":"Unquoted comma/space-separated annotations in shell; missing '=' in a pair; copying YAML-style annotations (key: value) into the flag; confusion because the error text shows the labels value.","solutions":["Format annotations as comma-separated KEY=VALUE pairs and quote them: --annotations \"owner=team,slot=priority\"","Verify each pair contains '=' and uses valid Kubernetes annotation keys/values","If the error message shows the wrong input (your labels instead of annotations), be aware of the known message bug in workflow/util/util.go:287 — fix your --annotations value, not your --labels"],"exampleFix":"// before\nargo submit wf.yaml --annotations owner: team\n// after\nargo submit wf.yaml --annotations \"owner=team\"","handlingStrategy":"validation","validationCode":"for _, pair := range strings.Split(annotationsArg, \",\") {\n    if !strings.Contains(pair, \"=\") || strings.SplitN(pair, \"=\", 2)[0] == \"\" {\n        return fmt.Errorf(\"invalid annotation pair %q; use NAME=VALUE,NAME=VALUE\", pair)\n    }\n}","typeGuard":null,"tryCatchPattern":"err := util.ApplySubmitOpts(wf, opts)\nif err != nil && strings.Contains(err.Error(), \"expected Annotations of the form\") {\n    // note: message may show opts.Labels due to upstream bug — inspect --annotations\n    return fmt.Errorf(\"fix --annotations flag (KEY=VALUE,KEY=VALUE): %w\", err)\n}","preventionTips":["Quote --annotations values in shell","Remember the error message may display the labels value due to the known bug at workflow/util/util.go:287 — check annotations first","Pre-validate annotation strings with the same regex used for labels"],"tags":["annotations","cli","validation","arguments"],"backgroundTag":"malformed-annotations-argument","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"}