{"record":{"id":"cea701fea6b68b82","repo":"GoogleContainerTools/skaffold","slug":"invalid-setter-pattern-for-array-node-q","errorCode":null,"errorMessage":"invalid setter pattern for array node: %q","messagePattern":"invalid setter pattern for array node: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/render/applysetters/apply_setters.go","lineNumber":182,"sourceCode":"\t\t\t// the setter comment will be on value node\n\t\t\tlineComment = node.Value.YNode().LineComment\n\t\t}\n\n\t\tsetterPattern := extractSetterPattern(lineComment)\n\t\tif setterPattern == \"\" {\n\t\t\t// the node is not tagged with setter pattern\n\t\t\treturn nil\n\t\t}\n\n\t\tif !shouldSet(setterPattern, as.Setters) {\n\t\t\t// this means there is no intent from user to modify this setter tagged resources\n\t\t\treturn nil\n\t\t}\n\n\t\t// since this setter pattern is found on sequence node, make sure that it is\n\t\t// not interpolation of setters, it should be simple setter e.g. ${environments}\n\t\tif !validArraySetterPattern(setterPattern) {\n\t\t\treturn errors.Errorf(\"invalid setter pattern for array node: %q\", setterPattern)\n\t\t}\n\n\t\t// get the setter value for the setter name in the comment\n\t\tsv := setterValue(as.Setters, setterPattern)\n\n\t\t// add the key to the field path\n\t\tfieldPath := strings.TrimPrefix(fmt.Sprintf(\"%s.%s\", path, node.Key.YNode().Value), \".\")\n\n\t\tif sv == \"\" {\n\t\t\tnode.Value.YNode().Content = []*yaml.Node{}\n\t\t\t// empty sequence must be FlowStyle e.g. env: [] # from-param: ${env}\n\t\t\tnode.Value.YNode().Style = yaml.FlowStyle\n\t\t\t// setter pattern comment must be on value node\n\t\t\tnode.Value.YNode().LineComment = lineComment\n\t\t\tnode.Key.YNode().LineComment = \"\"\n\t\t\tas.Results = append(as.Results, &Result{\n\t\t\t\tFilePath:  as.filePath,\n\t\t\t\tFieldPath: fieldPath,","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/render/applysetters/apply_setters.go#L164-L200","documentation":"Fires while applying array setters: a sequence node carries a setter pattern comment, but the pattern is not a simple single-setter reference (e.g. it's an interpolation like ${a}-${b}). Array nodes only support simple setter patterns such as ${environments}.","triggerScenarios":"Thrown at pkg/skaffold/render/applysetters/apply_setters.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a simple single-setter pattern (e.g. ${environments}) on array/list nodes","Move interpolations to scalar nodes, which support them","Supply the array value as a comma-separated or JSON array via the setter input"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}