{"record":{"id":"8f2aa12a60b2888e","repo":"kubernetes/kops","slug":"invalid-hetzner-object-storage-path-q-8f2aa1","errorCode":null,"errorMessage":"invalid Hetzner object storage path: %q","messagePattern":"invalid Hetzner object storage path: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"util/pkg/vfs/context.go","lineNumber":440,"sourceCode":"\t\t// Akamai (Linode) requires checksum-when-required behavior\n\t\to.RequestChecksumCalculation = aws.RequestChecksumCalculationWhenRequired\n\t\to.ResponseChecksumValidation = aws.ResponseChecksumValidationWhenRequired\n\t})\n\treturn s3path, nil\n}\n\nfunc (c *VFSContext) buildHetznerPath(p string) (*S3Path, error) {\n\tendpoint := os.Getenv(\"S3_ENDPOINT\")\n\tif endpoint == \"\" {\n\t\treturn nil, fmt.Errorf(\"required S3_ENDPOINT env var for path: %q\", p)\n\t}\n\n\tu, err := url.Parse(p)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"invalid Hetzner Object Storage path: %q\", p)\n\t}\n\tif u.Scheme != \"hos\" {\n\t\treturn nil, fmt.Errorf(\"invalid Hetzner object storage path: %q\", p)\n\t}\n\n\tbucket := strings.TrimSuffix(u.Host, \"/\")\n\tif bucket == \"\" {\n\t\treturn nil, fmt.Errorf(\"invalid Hetzner object storage path: %q\", p)\n\t}\n\n\ts3path := newS3Path(c.s3Context, u.Scheme, bucket, u.Path, false, func(o *s3.Options) {\n\t\to.BaseEndpoint = aws.String(endpoint)\n\t\to.UsePathStyle = true\n\t\to.DisableLogOutputChecksumValidationSkipped = true\n\t})\n\treturn s3path, nil\n}\n\nfunc (c *VFSContext) buildKubernetesPath(p string) (*KubernetesPath, error) {\n\tu, err := url.Parse(p)\n\tif err != nil {","sourceCodeStart":422,"sourceCodeEnd":458,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/util/pkg/vfs/context.go#L422-L458","documentation":"buildHetznerPath validates that a Hetzner Object Storage VFS path uses the \"hos\" scheme. The path parsed as a URL successfully but its scheme is not exactly \"hos\", so kOps refuses to treat it as Hetzner Object Storage and throws this error.","triggerScenarios":"BuildVfsPath dispatches to buildHetznerPath with a path like \"s3://bucket\", \"https://bucket\", \"HOS://bucket\", or \"host://bucket\" — url.Parse succeeds but u.Scheme != \"hos\".","commonSituations":"Using an s3:// or standard https:// state store URL while kOps was configured for Hetzner; capitalizing the scheme (URL schemes are lowercased by convention but compared case-sensitively here); copying an AWS-style config and forgetting to change the scheme.","solutions":["Change the scheme to lowercase hos://, e.g. --state-store=hos://my-bucket","If you actually intend AWS S3, set the state store to s3://bucket so BuildVfsPath routes to the S3 builder instead","Ensure no hidden prefix (BOM, whitespace) before \"hos://\" in the value"],"exampleFix":"// before\n--state-store=s3://my-bucket  # dispatched to Hetzner builder\n// after\n--state-store=hos://my-bucket","handlingStrategy":"validation","validationCode":"u, err := url.Parse(stateStore)\nif err != nil || u.Scheme != \"hos\" {\n\treturn fmt.Errorf(\"Hetzner state store must use the hos:// scheme, got %q\", stateStore)\n}","typeGuard":null,"tryCatchPattern":"p, err := vfs.Context.BuildVfsPath(stateStore)\nif err != nil {\n\tif strings.Contains(err.Error(), \"invalid Hetzner object storage path\") {\n\t\treturn fmt.Errorf(\"expected hos:// scheme for Hetzner Object Storage: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Use lowercase hos:// exactly as the scheme","Don't reuse s3:// or https:// URLs for a Hetzner state store","Strip any whitespace/BOM before the scheme in config values"],"tags":["vfs","hetzner","url-scheme"],"backgroundTag":"invalid-vfs-path","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"}