{"record":{"id":"6360ceb7a1fdae8f","repo":"argoproj/argo-workflows","slug":"resource-identifier-s-is-malformed-should-be","errorCode":null,"errorMessage":"resource identifier '%s' is malformed. Should be `kind/name`, e.g. cronwf/hello-world-cwf","messagePattern":"resource identifier '(.+?)' is malformed\\. Should be `kind/name`, e\\.g\\. cronwf/hello-world-cwf","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/submit.go","lineNumber":181,"sourceCode":"\t\t\treturn errors.New(\"--dry-run should have an output option\")\n\t\t}\n\t\tif submitOpts.ServerDryRun {\n\t\t\treturn errors.New(\"--dry-run cannot be combined with --server-dry-run\")\n\t\t}\n\t}\n\n\tif submitOpts.ServerDryRun {\n\t\tif cliOpts.Output.String() == \"\" {\n\t\t\treturn errors.New(\"--server-dry-run should have an output option\")\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc submitWorkflowFromResource(ctx context.Context, serviceClient workflowpkg.WorkflowServiceClient, namespace string, resourceIdentifier string, submitOpts *wfv1.SubmitOpts, cliOpts *common.CliSubmitOpts) error {\n\tparts := strings.SplitN(resourceIdentifier, \"/\", 2)\n\tif len(parts) != 2 {\n\t\treturn fmt.Errorf(\"resource identifier '%s' is malformed. Should be `kind/name`, e.g. cronwf/hello-world-cwf\", resourceIdentifier)\n\t}\n\tkind := parts[0]\n\tname := parts[1]\n\n\ttempwf := wfv1.Workflow{}\n\n\tif err := validateOptions([]wfv1.Workflow{tempwf}, submitOpts, cliOpts); err != nil {\n\t\treturn err\n\t}\n\tif cliOpts.ScheduledTime != \"\" {\n\t\t_, err := time.Parse(time.RFC3339, cliOpts.ScheduledTime)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"scheduled-time contains invalid time.RFC3339 format. (e.g.: `2006-01-02T15:04:05-07:00`)\")\n\t\t}\n\t\tsubmitOpts.Annotations = fmt.Sprintf(\"%s=%s\", wfcommon.AnnotationKeyCronWfScheduledTime, cliOpts.ScheduledTime)\n\t}\n\n\tcreated, err := serviceClient.SubmitWorkflow(ctx, &workflowpkg.WorkflowSubmitRequest{","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/submit.go#L163-L199","documentation":"When submitting from an existing resource (`argo submit --from kind/name`), submitWorkflowFromResource splits the identifier on '/' with SplitN(..., 2) and requires exactly two parts: kind and name. A value without a slash or an empty segment fails with this error before any object is fetched.","triggerScenarios":"Running e.g. `argo submit --from cronwf` (no '/name') or `--from 'cronwf/'` (empty name) or `--from '/hello-world-cwf'` (empty kind).","commonSituations":"Forgetting the name and passing only a kind; shell variables expanding to empty name; using fully-qualified kinds or namespace-qualified paths (ns/name/kind) that the parser doesn't accept.","solutions":["Pass the identifier as kind/name, e.g. --from cronwf/hello-world-cwf.","Supported kinds include cronwf, cronworkflow, clusterworkflowtemplate, workflowtemplate, workflow (per the command docs).","Verify the shell variable holding the identifier expands to a non-empty kind and name."],"exampleFix":"// before\nargo submit --from cronwf -n argo\n// after\nargo submit --from cronwf/hello-world-cwf -n argo","handlingStrategy":"validation","validationCode":"id=\"cronwf/hello-world-cwf\"\nparts := strings.SplitN(id, \"/\", 2)\nif len(parts) != 2 || parts[0] == \"\" || parts[1] == \"\" {\n    return errors.New(\"--from must be kind/name, e.g. cronwf/hello-world-cwf\")\n}","typeGuard":"func isKindName(s string) bool {\n\tp := strings.SplitN(s, \"/\", 2)\n\treturn len(p) == 2 && p[0] != \"\" && p[1] != \"\"\n}","tryCatchPattern":"err := cmd.Run()\nif err != nil && strings.Contains(err.Error(), \"is malformed. Should be\") {\n    log.Fatal(\"pass --from kind/name\")\n}","preventionTips":["Always include both kind and name separated by '/'.","Check shell variables expand to non-empty values before building --from.","Use short kinds accepted by the CLI (cronwf, workflowtemplate, clusterworkflowtemplate, workflow)."],"tags":["cli","argo-cli","argument-parsing","submit"],"backgroundTag":"malformed-resource-identifier","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"}