argoproj/argo-workflows · error

expected parameter of the form: NAME=VALUE. Received: %s

Error message

expected parameter of the form: NAME=VALUE. Received: %s

What it means

Each `--output-parameter` flag value must be in NAME=VALUE form; the command splits the string on the first '=' with strings.SplitN(param, "=", 2) and requires exactly two parts. If no '=' is present, the CLI rejects the argument before contacting the server. Note the value may itself contain '=' since SplitN limits to 2 parts.

Source

Thrown at cmd/argo/commands/node.go:49

  argo node set my-wf --output-parameter parameter-name="Hello, world!" --node-field-selector displayName=approve

# Set the message of a node within a workflow:

  argo node set my-wf --message "We did it!"" --node-field-selector displayName=approve
`,
		Args: cobra.MinimumNArgs(2),
		RunE: func(cmd *cobra.Command, args []string) error {
			if args[0] != "set" {
				return fmt.Errorf("unknown action '%s'", args[0])
			}

			outputParameters := ""
			if len(setArgs.outputParameters) > 0 {
				outputParams := make(map[string]string)
				for _, param := range setArgs.outputParameters {
					parts := strings.SplitN(param, "=", 2)
					if len(parts) != 2 {
						return fmt.Errorf("expected parameter of the form: NAME=VALUE. Received: %s", param)
					}
					unquoted, err := strconv.Unquote(parts[1])
					if err != nil {
						unquoted = parts[1]
					}
					outputParams[parts[0]] = unquoted
				}
				res, err := json.Marshal(outputParams)
				if err != nil {
					return fmt.Errorf("unable to parse output parameter set request: %w", err)
				}
				outputParameters = string(res)
			}

			ctx := cmd.Context()
			ctx, apiClient, err := client.NewAPIClient(ctx)
			if err != nil {
				return err

View on GitHub (pinned to 35bff19146)

Solutions

  1. Pass the parameter as NAME=VALUE, e.g. --output-parameter myparam="Hello, world!".
  2. Quote the whole argument in your shell so '=' and spaces survive, e.g. --output-parameter 'myparam=some value'.
  3. Verify with `echo` the exact argument if a script builds it dynamically.

Example fix

// before
argo node set my-wf -p myparam --node-field-selector displayName=approve
// after
argo node set my-wf -p myparam="Hello, world!" --node-field-selector displayName=approve
Defensive patterns

Strategy: validation

Validate before calling

for p in "${PARAMS[@]}"; do case "$p" in *=*) ;; *) echo "bad param (need NAME=VALUE): $p"; exit 1;; esac; done

Type guard

func isNameValue(s string) bool { return strings.Contains(s, "=") && strings.Index(s, "=") > 0 }

Prevention

When it happens

Trigger: Running `argo node set` with `--output-parameter paramname` (missing '='), e.g. `--output-parameter myparam` instead of `--output-parameter myparam="value"`.

Common situations: Shell quoting issues that swallow the '=' or the value; users thinking the flag takes just a parameter name; whitespace around '=' is allowed but the name part will contain it.

Related errors


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/36a72c5818ff2418. Report an issue: GitHub.