argoproj/argo-workflows · error
resource identifier '%s' is malformed. Should be `kind/name`
Error message
resource identifier '%s' is malformed. Should be `kind/name`, e.g. cronwf/hello-world-cwf
What it means
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.
Source
Thrown at cmd/argo/commands/submit.go:181
return errors.New("--dry-run should have an output option")
}
if submitOpts.ServerDryRun {
return errors.New("--dry-run cannot be combined with --server-dry-run")
}
}
if submitOpts.ServerDryRun {
if cliOpts.Output.String() == "" {
return errors.New("--server-dry-run should have an output option")
}
}
return nil
}
func submitWorkflowFromResource(ctx context.Context, serviceClient workflowpkg.WorkflowServiceClient, namespace string, resourceIdentifier string, submitOpts *wfv1.SubmitOpts, cliOpts *common.CliSubmitOpts) error {
parts := strings.SplitN(resourceIdentifier, "/", 2)
if len(parts) != 2 {
return fmt.Errorf("resource identifier '%s' is malformed. Should be `kind/name`, e.g. cronwf/hello-world-cwf", resourceIdentifier)
}
kind := parts[0]
name := parts[1]
tempwf := wfv1.Workflow{}
if err := validateOptions([]wfv1.Workflow{tempwf}, submitOpts, cliOpts); err != nil {
return err
}
if cliOpts.ScheduledTime != "" {
_, err := time.Parse(time.RFC3339, cliOpts.ScheduledTime)
if err != nil {
return fmt.Errorf("scheduled-time contains invalid time.RFC3339 format. (e.g.: `2006-01-02T15:04:05-07:00`)")
}
submitOpts.Annotations = fmt.Sprintf("%s=%s", wfcommon.AnnotationKeyCronWfScheduledTime, cliOpts.ScheduledTime)
}
created, err := serviceClient.SubmitWorkflow(ctx, &workflowpkg.WorkflowSubmitRequest{View on GitHub (pinned to 35bff19146)
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.
Example fix
// before argo submit --from cronwf -n argo // after argo submit --from cronwf/hello-world-cwf -n argo
Defensive patterns
Strategy: validation
Validate before calling
id="cronwf/hello-world-cwf"
parts := strings.SplitN(id, "/", 2)
if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
return errors.New("--from must be kind/name, e.g. cronwf/hello-world-cwf")
} Type guard
func isKindName(s string) bool {
p := strings.SplitN(s, "/", 2)
return len(p) == 2 && p[0] != "" && p[1] != ""
} Try / catch
err := cmd.Run()
if err != nil && strings.Contains(err.Error(), "is malformed. Should be") {
log.Fatal("pass --from kind/name")
} Prevention
- 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).
When it happens
Trigger: Running e.g. `argo submit --from cronwf` (no '/name') or `--from 'cronwf/'` (empty name) or `--from '/hello-world-cwf'` (empty kind).
Common situations: 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.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- cannot combine --from with file arguments
- cannot watch more than one workflow
- --wait cannot be combined with --watch
- --watch cannot be combined with --dry-run
- --watch cannot be combined with --server-dry-run
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/6360ceb7a1fdae8f.
Report an issue: GitHub.