{"record":{"id":"0a1c31e9b6aa379a","repo":"kubernetes/kops","slug":"invalid-google-cloud-url-no-name-q","errorCode":null,"errorMessage":"invalid google cloud URL (no name): %q","messagePattern":"invalid google cloud URL \\(no name\\): %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gce/gce_url.go","lineNumber":108,"sourceCode":"\t\tcase t == \"zones\":\n\t\t\tpos++\n\t\t\tif pos >= len(tokens) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid google cloud URL (unexpected zones): %q\", u)\n\t\t\t}\n\t\t\tparsed.Zone = tokens[pos]\n\t\tcase t == \"regions\" && ((pos + 2) < len(tokens)):\n\t\t\tpos++\n\t\t\tif pos >= len(tokens) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid google cloud URL (unexpected regions): %q\", u)\n\t\t\t}\n\t\t\tparsed.Region = tokens[pos]\n\t\tcase t == \"global\":\n\t\t\tparsed.Global = true\n\t\tdefault:\n\t\t\tparsed.Type = tokens[pos]\n\t\t\tpos++\n\t\t\tif pos >= len(tokens) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid google cloud URL (no name): %q\", u)\n\t\t\t}\n\t\t\tparsed.Name = tokens[pos]\n\t\t\tpos++\n\t\t\tif pos != len(tokens) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid google cloud URL (content after name): %q\", u)\n\t\t\t} else {\n\t\t\t\treturn parsed, nil\n\t\t\t}\n\t\t}\n\t\tpos++\n\t}\n}\n","sourceCodeStart":90,"sourceCodeEnd":121,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gce/gce_url.go#L90-L121","documentation":"Final guard of ParseGoogleCloudURL: after identifying the resource type token, a resource name must follow. This fires when a Google Cloud self-link ends with the resource type and no name (e.g. .../zones/us-west1-a/instances/), so the parsed URL would be nameless and unusable.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gce/gce_url.go:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Complete the URL with the resource name after the type segment","Fix truncated or malformed self-links"],"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-12T12:17:11.808Z"}