GoogleContainerTools/skaffold · error

input to array setter must be an array of values, but found

Error message

input to array setter must be an array of values, but found %q

What it means

Fires when the value provided for an array setter fails to parse as YAML — the setter targets a sequence node, so its input must be an array of values (e.g. [a,b] or a comma-separated list), but the supplied string parsed to a scalar/map instead.

Source

Thrown at pkg/skaffold/render/applysetters/apply_setters.go:209

		if sv == "" {
			node.Value.YNode().Content = []*yaml.Node{}
			// empty sequence must be FlowStyle e.g. env: [] # from-param: ${env}
			node.Value.YNode().Style = yaml.FlowStyle
			// setter pattern comment must be on value node
			node.Value.YNode().LineComment = lineComment
			node.Key.YNode().LineComment = ""
			as.Results = append(as.Results, &Result{
				FilePath:  as.filePath,
				FieldPath: fieldPath,
				Value:     sv,
			})
			return nil
		}

		// parse the setter value as yaml node
		rn, err := yaml.Parse(sv)
		if err != nil {
			return errors.Errorf("input to array setter must be an array of values, but found %q", sv)
		}

		// the setter value must parse as sequence node
		if rn.YNode().Kind != yaml.SequenceNode {
			return errors.Errorf("input to array setter must be an array of values, but found %q", sv)
		}

		node.Value.YNode().Content = rn.YNode().Content
		node.Key.YNode().LineComment = lineComment
		// non-empty sequences should be standardized to FoldedStyle
		// env: # from-param: ${env}
		//  - foo
		//  - bar
		node.Value.YNode().Style = yaml.FoldedStyle

		as.Results = append(as.Results, &Result{
			FilePath:  as.filePath,
			FieldPath: fieldPath,

View on GitHub (pinned to a1189de023)

Solutions

  1. Provide the value as an array, e.g. --set-string key=[a,b] or a comma-separated list per the docs
  2. Quote the value so the shell passes brackets/commas through intact
  3. Check for trailing characters that make the YAML parse to a non-array
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/skaffold/render/applysetters/apply_setters.go:209 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05). Data as JSON: /api/errors/d55d4dde725ced5f. Report an issue: GitHub.