{"record":{"id":"fc57062d10750a5c","repo":"kubernetes/kops","slug":"resourceversion-not-supported-in-instancegroupvfs-fc5706","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":"pkg/client/simple/vfsclientset/instancegroup.go","lineNumber":66,"sourceCode":"\tclusterName := cluster.Name\n\tkind := \"InstanceGroup\"\n\n\tr := &InstanceGroupVFS{\n\t\tcluster:     cluster,\n\t\tclusterName: clusterName,\n\t}\n\tr.Init(kind, c.VFSContext(), c.basePath.Join(clusterName, \"instancegroup\"), StoreVersion)\n\tr.validate = func(o runtime.Object) error {\n\t\treturn validation.ValidateInstanceGroup(o.(*kopsapi.InstanceGroup), nil, false).ToAggregate()\n\t}\n\treturn r\n}\n\nvar _ kopsinternalversion.InstanceGroupInterface = &InstanceGroupVFS{}\n\nfunc (c *InstanceGroupVFS) 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.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 *InstanceGroupVFS) addLabels(ig *kopsapi.InstanceGroup) {\n\tif ig.ObjectMeta.Labels == nil {\n\t\tig.ObjectMeta.Labels = make(map[string]string)","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/client/simple/vfsclientset/instancegroup.go#L48-L84","documentation":"InstanceGroupVFS.Get is a simple VFS read and does not support the ResourceVersion field of metav1.GetOptions. If options.ResourceVersion is non-empty it rejects the call immediately. Callers must pass zero-valued GetOptions.","triggerScenarios":"Calling InstanceGroupVFS.Get (directly or via Update, which calls Get) with GetOptions{ResourceVersion: \"...\"} set — e.g. code ported from the API-server clientset.","commonSituations":"Generic client code propagating ResourceVersion from a previous list/watch; migrating from registry-based to VFS-based clientsets; optimistic-concurrency code paths expecting etcd-style resource versions.","solutions":["Pass metav1.GetOptions{} (empty ResourceVersion) when using InstanceGroupVFS.","Remove code that copies ResourceVersion from prior responses into Get options.","Implement optimistic concurrency above the VFS layer if needed, not via GetOptions."],"exampleFix":"// before\nig, err := c.Get(ctx, name, metav1.GetOptions{ResourceVersion: rv})\n// after\nig, err := c.Get(ctx, name, metav1.GetOptions{})","handlingStrategy":"validation","validationCode":"if options.ResourceVersion != \"\" {\n    return fmt.Errorf(\"ResourceVersion is not supported by VFS-backed clients\")\n}\nig, err := client.Get(ctx, name, options)","typeGuard":null,"tryCatchPattern":"ig, err := client.Get(ctx, name, opts)\nif err != nil {\n    if strings.Contains(err.Error(), \"ResourceVersion not supported\") {\n        return client.Get(ctx, name, metav1.GetOptions{})\n    }\n    return err\n}","preventionTips":["Always pass empty metav1.GetOptions{} to VFS-backed Gets","Strip ResourceVersion in shared client code that may target VFS","Do not rely on etcd-style resource versions with kops VFS clients"],"tags":["vfs","unsupported-option","api-misuse"],"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-12T12:17:11.808Z"}