{"record":{"id":"da438f6535294278","repo":"kubernetes/kops","slug":"failed-validating-input-specs-w","errorCode":null,"errorMessage":"failed validating input specs: %w","messagePattern":"failed validating input specs: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/populate_instancegroup_spec.go","lineNumber":83,"sourceCode":"// TODO: this hardcoded list can be replaced with DescribeInstanceTypes' DedicatedHostsSupported field\nvar awsDedicatedInstanceExceptions = map[string]bool{\n\t\"t2.nano\":   true,\n\t\"t2.micro\":  true,\n\t\"t2.small\":  true,\n\t\"t2.medium\": true,\n\t\"t2.large\":  true,\n\t\"t2.xlarge\": true,\n}\n\n// PopulateInstanceGroupSpec sets default values in the InstanceGroup\nfunc PopulateInstanceGroupSpec(cluster *kops.Cluster, input *kops.InstanceGroup, cloud fi.Cloud, channel *kops.Channel) (*kops.InstanceGroup, error) {\n\tklog.V(2).Infof(\"Populating instance group spec for %q\", input.GetName())\n\n\tvar err error\n\t// TODO: Pass in `cloud` to shift validation to ValidateInstanceGroup\n\terr = validation.ValidateInstanceGroup(input, nil, false).ToAggregate()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed validating input specs: %w\", err)\n\t}\n\n\tig := &kops.InstanceGroup{}\n\treflectutils.JSONMergeStruct(ig, input)\n\n\tigSpec := &ig.Spec\n\n\t// TODO: Clean up\n\tif ig.IsControlPlane() {\n\t\tif ig.Spec.MachineType == \"\" {\n\t\t\tig.Spec.MachineType, err = defaultMachineType(cloud, cluster, ig)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"assigning default machine type for control-plane nodes: %v\", err)\n\t\t\t}\n\n\t\t}\n\t\tif ig.Spec.MinSize == nil {\n\t\t\tig.Spec.MinSize = new(int32(1))","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/populate_instancegroup_spec.go#L65-L101","documentation":"The input InstanceGroup failed kops validation before defaulting is applied. The aggregate error lists the invalid fields (name, role, etc.); population is aborted so no defaults are computed for a broken spec.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/populate_instancegroup_spec.go:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read each error in the aggregate validation result","Fix the named fields in the instance group spec","Retry the operation"],"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"}