{"record":{"id":"ef466322f61b4346","repo":"kubernetes/kops","slug":"s","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/edit_cluster.go","lineNumber":137,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(options.Unsets)+len(options.Sets) > 0 {\n\t\tnewCluster := oldCluster.DeepCopy()\n\t\tif err := commands.UnsetClusterFields(options.Unsets, newCluster); err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif err := commands.SetClusterFields(options.Sets, newCluster); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfailure, err := updateCluster(ctx, clientset, oldCluster, newCluster, instanceGroups)\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 := util_editor.NewDefaultEditor(commandutils.EditorEnvs)\n\n\text := \"yaml\"\n\traw, err := kopscodecs.ToVersionedYaml(oldCluster)\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":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/edit_cluster.go#L119-L155","documentation":"In edit-cluster's non-interactive --set/--unset path, updateCluster returned a non-empty failure string (validation messages produced while applying the edited cluster, e.g. from tasks). This guard simply converts that failure text into an error.","triggerScenarios":"Thrown at cmd/kops/edit_cluster.go:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the failure message text for the specific validation problem","Fix the --set/--unset expressions accordingly","Use the interactive editor path to see 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-12T07:17:12.445Z"}