{"record":{"id":"1a6d93c45c2c8da9","repo":"kubernetes/kops","slug":"s-1a6d93","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/edit_instancegroup.go","lineNumber":162,"sourceCode":"\tif oldGroup == nil {\n\t\treturn fmt.Errorf(\"InstanceGroup %q not found\", groupName)\n\t}\n\n\tif len(options.Unsets)+len(options.Sets) > 0 {\n\t\tnewGroup := oldGroup.DeepCopy()\n\t\tif err := commands.UnsetInstancegroupFields(options.Unsets, newGroup); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := commands.SetInstancegroupFields(options.Sets, newGroup); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfailure, err := updateInstanceGroup(ctx, clientset, channel, cluster, newGroup)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif failure != \"\" {\n\t\t\treturn fmt.Errorf(\"%s\", failure)\n\t\t}\n\t\treturn nil\n\t}\n\n\teditor := editor.NewDefaultEditor(commandutils.EditorEnvs)\n\n\text := \"yaml\"\n\traw, err := kopscodecs.ToVersionedYaml(oldGroup)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tvar (\n\t\tresults = editResults{}\n\t\tedited  = []byte{}\n\t\tfile    string\n\t)\n","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/edit_instancegroup.go#L144-L180","documentation":"In edit-instancegroup's non-interactive --set/--unset path, updateInstanceGroup returned a non-empty failure string from validation while applying the edited spec. This guard converts that failure text into an error, mirroring edit-cluster behavior.","triggerScenarios":"Thrown at cmd/kops/edit_instancegroup.go:162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the failure text for the specific validation problem","Fix the --set/--unset expressions and retry","Use the interactive editor for fuller feedback"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}