{"record":{"id":"754a57043013fc87","repo":"kubernetes/kops","slug":"must-specify-the-name-of-the-instance-group-to-edi","errorCode":null,"errorMessage":"must specify the name of the instance group to edit","messagePattern":"must specify the name of the instance group to edit","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/edit_instancegroup.go","lineNumber":93,"sourceCode":"\nfunc NewCmdEditInstanceGroup(f *util.Factory, out io.Writer) *cobra.Command {\n\toptions := &EditInstanceGroupOptions{}\n\n\tcmd := &cobra.Command{\n\t\tUse:     \"instancegroup INSTANCE_GROUP\",\n\t\tAliases: []string{\"instancegroups\", \"ig\"},\n\t\tShort:   editInstancegroupShort,\n\t\tLong:    editInstancegroupLong,\n\t\tExample: editInstancegroupExample,\n\t\tArgs: func(cmd *cobra.Command, args []string) error {\n\t\t\toptions.ClusterName = rootCommand.ClusterName(true)\n\n\t\t\tif options.ClusterName == \"\" {\n\t\t\t\treturn fmt.Errorf(\"--name is required\")\n\t\t\t}\n\n\t\t\tif len(args) == 0 {\n\t\t\t\treturn fmt.Errorf(\"must specify the name of the instance group to edit\")\n\t\t\t}\n\n\t\t\toptions.GroupName = args[0]\n\n\t\t\tif len(args) != 1 {\n\t\t\t\treturn fmt.Errorf(\"can only edit one instance group at a time\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t\tValidArgsFunction: completeInstanceGroup(f, nil, nil),\n\t\tRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\treturn RunEditInstanceGroup(cmd.Context(), f, out, options)\n\t\t},\n\t}\n\n\tLazyQuoteStringSliceVar(cmd.Flags(), &options.Sets, \"set\", options.Sets, \"Directly set values in the spec\")\n\tcmd.RegisterFlagCompletionFunc(\"set\", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/edit_instancegroup.go#L75-L111","documentation":"Argument validation in `kops edit instancegroup`: the command requires exactly one positional argument (the instance group name to edit), and this guard fires when zero arguments are passed. The name must also be accompanied by a cluster via --name or the current context.","triggerScenarios":"Thrown at cmd/kops/edit_instancegroup.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide the instance group name: kops edit instancegroup <name>","List instance groups with kops get ig to find the name"],"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"}