{"record":{"id":"d01ae158350dad41","repo":"kubernetes/kops","slug":"resourceversion-not-supported-in-instancegroupvfs","errorCode":null,"errorMessage":"ResourceVersion not supported in InstanceGroupVFS::Get","messagePattern":"ResourceVersion not supported in InstanceGroupVFS::Get","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/pkg/controllerclientset/instancegroups.go","lineNumber":63,"sourceCode":"\t\tklog.Fatalf(\"cluster / cluster.Name is required\")\n\t}\n\n\tclusterName := cluster.Name\n\tkind := \"InstanceGroup\"\n\n\tr := &instanceGroups{\n\t\t// cluster:     cluster,\n\t\tclusterName: clusterName,\n\t}\n\t// We don't expect to need encoding\n\tvar storeVersion runtime.GroupVersioner\n\tr.base.Init(kind, vfsContext, clusterBasePath.Join(\"instancegroup\"), storeVersion)\n\treturn r\n}\n\nfunc (c *instanceGroups) Get(ctx context.Context, name string, options metav1.GetOptions) (*kopsapi.InstanceGroup, error) {\n\tif options.ResourceVersion != \"\" {\n\t\treturn nil, fmt.Errorf(\"ResourceVersion not supported in InstanceGroupVFS::Get\")\n\t}\n\n\to, err := c.base.Find(ctx, name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif o == nil {\n\t\treturn nil, errors.NewNotFound(schema.GroupResource{Group: kopsapi.GroupName, Resource: \"InstanceGroup\"}, name)\n\t}\n\tig := o.(*kopsapi.InstanceGroup)\n\tc.addLabels(ig)\n\n\treturn ig, nil\n}\n\nfunc (c *instanceGroups) addLabels(ig *kopsapi.InstanceGroup) {\n\tif ig.ObjectMeta.Labels == nil {\n\t\tig.ObjectMeta.Labels = make(map[string]string)","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/pkg/controllerclientset/instancegroups.go#L45-L81","documentation":"The VFS-backed InstanceGroup Get supports only default read semantics; requesting a specific ResourceVersion (stale/consistent read hint from the k8s API) cannot be honored by the underlying VFS store, so it is rejected up front rather than silently ignored.","triggerScenarios":"Calling instanceGroups.Get(ctx, name, metav1.GetOptions{ResourceVersion: \"12345\"}) with a non-empty ResourceVersion, typically from code that copied options from a real kubernetes client call.","commonSituations":"Porting informer/watch-based code that threads ResourceVersion through Get; retry logic that reuses List options' ResourceVersion in Get.","solutions":["Pass an empty metav1.GetOptions{} so no ResourceVersion is requested","Strip ResourceVersion from GetOptions before calling VFS-backed Get","If read consistency is required, use the real kubernetes API client instead of the VFS-backed one"],"exampleFix":"// before\nig, err := client.InstanceGroupsFor(cluster).Get(ctx, \"nodes\", metav1.GetOptions{ResourceVersion: rv})\n// after\nig, err := client.InstanceGroupsFor(cluster).Get(ctx, \"nodes\", metav1.GetOptions{})","handlingStrategy":"validation","validationCode":"if options.ResourceVersion != \"\" {\n  options.ResourceVersion = \"\" // VFS-backed Get ignores consistency hints\n}","typeGuard":null,"tryCatchPattern":"ig, err := igs.Get(ctx, name, options)\nif err != nil && strings.Contains(err.Error(), \"ResourceVersion not supported\") {\n  ig, err = igs.Get(ctx, name, metav1.GetOptions{})\n}","preventionTips":["Always pass empty metav1.GetOptions{} to VFS-backed instance group reads","Do not thread ResourceVersion from informer/watch code into VFS calls","Use the real kubernetes client when RV-consistent reads matter"],"tags":["go","kops","vfs","invalid-options"],"backgroundTag":"unsupported-resource-version","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"}