argoproj/argo-workflows · error

unknown action '%s'

Error message

unknown action '%s'

What it means

The `argo node` command only supports the `set` action; any other first positional argument is rejected with this error before any API call is made. It is a simple CLI-level argument check comparing args[0] against the literal string "set". The command's Usage line (`node ACTION WORKFLOW FLAGS`) accepts an ACTION placeholder, which can mislead users into trying other verbs.

Source

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

func NewNodeCommand() *cobra.Command {
	var setArgs setOps

	command := &cobra.Command{
		Use:   "node ACTION WORKFLOW FLAGS",
		Short: "perform action on a node in a workflow",
		Example: `# Set outputs to a node within a workflow:

  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 {

View on GitHub (pinned to 35bff19146)

Solutions

  1. Use the only supported action: `argo node set WORKFLOW [flags]`.
  2. For reading node info use `argo get WORKFLOW` instead of `argo node get`.
  3. For stopping/resuming nodes use `argo stop`/`argo resume` with --node-field-selector.

Example fix

// before
argo node update my-wf --node-field-selector displayName=approve --message "done"
// after
argo node set my-wf --node-field-selector displayName=approve --message "done"
Defensive patterns

Strategy: validation

Validate before calling

ACTION=$1; if [ "$ACTION" != "set" ]; then echo "argo node only supports 'set'"; exit 1; fi

Type guard

func isValidNodeAction(a string) bool { return a == "set" }

Prevention

When it happens

Trigger: Running `argo node` with a first argument other than "set", e.g. `argo node get my-wf ...`, `argo node update my-wf ...`, or a typo like `argo node sett my-wf --message x`.

Common situations: Users assuming `argo node` has CRUD-style subcommands (get/update/delete) mirroring `argo res`; typos of `set`; copying commands written for other argo verbs.

Related errors


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