{"record":{"id":"d3ce5271473afaba","repo":"kubernetes/kops","slug":"unknown-unhandled-path-type-q","errorCode":null,"errorMessage":"unknown / unhandled path type: %q","messagePattern":"unknown / unhandled path type: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/context.go","lineNumber":222,"sourceCode":"\t}\n\n\tif strings.HasPrefix(p, \"k8s://\") {\n\t\treturn c.buildKubernetesPath(p)\n\t}\n\n\tif strings.HasPrefix(p, \"swift://\") {\n\t\treturn c.buildOpenstackSwiftPath(p)\n\t}\n\n\tif strings.HasPrefix(p, \"azureblob://\") {\n\t\treturn c.buildAzureBlobPath(p)\n\t}\n\n\tif strings.HasPrefix(p, \"scw://\") {\n\t\treturn c.buildSCWPath(p)\n\t}\n\n\treturn nil, fmt.Errorf(\"unknown / unhandled path type: %q\", p)\n}\n\n// readAWSMetadata reads the specified path from the AWS EC2 metadata service\nfunc (c *VFSContext) readAWSMetadata(ctx context.Context, path string) ([]byte, error) {\n\tconfig, err := awsconfig.LoadDefaultConfig(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to load AWS config: %w\", err)\n\t}\n\n\tclient := imds.NewFromConfig(config)\n\n\tif strings.HasPrefix(path, \"/meta-data/\") {\n\t\ts, err := client.GetMetadata(ctx, &imds.GetMetadataInput{\n\t\t\tPath: strings.TrimPrefix(path, \"/meta-data/\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error reading from AWS metadata service: %v\", err)\n\t\t}","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/context.go#L204-L240","documentation":"BuildVfsPath maps a path string to a VFS Path implementation by prefix matching known schemes (file, s3, do, linode, hos, memfs, gs, k8s, swift, azureblob, scw). A path with \"://\" whose scheme matches none of these has no implementation, so the library rejects it.","triggerScenarios":"Calling BuildVfsPath (via ConfigBase, NewServer, parseFlags, transferFile, validateServiceAccountIssuerDiscovery, ResolveS3Region) with an unknown scheme, e.g. 'azblob://container/key', 'oss://bucket/key', 'abfs://...', or a typo like 's403://bucket'.","commonSituations":"Setting KOPS_STATE_STORE to a cloud kOps does not support (or a misspelled scheme); using an aliased or renamed scheme from an older kOps version; pointing tooling at an object store with a similar-but-different URL scheme.","solutions":["Use a supported scheme prefix: file://, s3://, gs://, do://, linode://, hos://, memfs://, k8s://, swift://, azureblob://, scw://","Fix typos in the scheme (e.g. azureblob:// not azure://, hos:// not hetzner://)","Check `kops` docs/version - unsupported backends require a different storage location","If the string is really a local path, remove the accidental '://' from it"],"exampleFix":"// before\nexport KOPS_STATE_STORE=azure://mystorage/clusters\n// after\nexport KOPS_STATE_STORE=azureblob://mystorageaccount/mystorage","handlingStrategy":"validation","validationCode":"var supportedSchemes = []string{\"file\", \"s3\", \"do\", \"linode\", \"hos\", \"memfs\", \"gs\", \"k8s\", \"swift\", \"azureblob\", \"scw\"}\nfunc validateVfsScheme(p string) error {\n\ti := strings.Index(p, \"://\")\n\tif i < 0 {\n\t\treturn nil\n\t}\n\tscheme := p[:i]\n\tfor _, s := range supportedSchemes {\n\t\tif scheme == s {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn fmt.Errorf(\"scheme %q not supported by vfs; use one of %v\", scheme, supportedSchemes)\n}","typeGuard":"func isSupportedVfsPath(p string) bool {\n\tfor _, s := range []string{\"file://\", \"s3://\", \"do://\", \"linode://\", \"hos://\", \"memfs://\", \"gs://\", \"k8s://\", \"swift://\", \"azureblob://\", \"scw://\"} {\n\t\tif strings.HasPrefix(p, s) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn !strings.Contains(p, \"://\")\n}","tryCatchPattern":"path, err := vfs.Context.BuildVfsPath(p)\nif err != nil && strings.Contains(err.Error(), \"unknown / unhandled path type\") {\n\treturn fmt.Errorf(\"KOPS_STATE_STORE scheme not supported: %w\", err)\n}","preventionTips":["Copy scheme prefixes exactly from kOps docs (azureblob://, hos://, etc.)","Validate KOPS_STATE_STORE early at command startup with BuildVfsPath so failures surface before any work","Check supported backends for your kOps version - the scheme list changes over releases"],"tags":["vfs","unsupported-scheme","configuration"],"backgroundTag":"unsupported-scheme","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"}