{"record":{"id":"b039964b7c099bc9","repo":"kubernetes/kops","slug":"could-not-determine-region-from-zone-s-w","errorCode":null,"errorMessage":"could not determine region from zone %s: %w","messagePattern":"could not determine region from zone (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/utils.go","lineNumber":63,"sourceCode":"\treturn isHTTPCodeError(err, http.StatusNotFound) || errors.As(err, &notFoundError)\n}\n\nfunc ParseZoneFromClusterSpec(clusterSpec kops.ClusterSpec) (scw.Zone, error) {\n\tzone := \"\"\n\tfor _, subnet := range clusterSpec.Networking.Subnets {\n\t\tif zone == \"\" {\n\t\t\tzone = subnet.Zone\n\t\t} else if zone != subnet.Zone {\n\t\t\treturn \"\", fmt.Errorf(\"scaleway currently only supports clusters in the same zone\")\n\t\t}\n\t}\n\treturn scw.Zone(zone), nil\n}\n\nfunc ParseRegionFromZone(zone scw.Zone) (region scw.Region, err error) {\n\tregion, err = scw.ParseRegion(strings.TrimRight(string(zone), \"-123\"))\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"could not determine region from zone %s: %w\", zone, err)\n\t}\n\treturn region, nil\n}\n\nfunc ClusterNameFromTags(tags []string) string {\n\tfor _, tag := range tags {\n\t\tif strings.HasPrefix(tag, TagClusterName) {\n\t\t\treturn strings.TrimPrefix(tag, TagClusterName+\"=\")\n\t\t}\n\t}\n\treturn \"\"\n}\n\nfunc InstanceGroupNameFromTags(tags []string) string {\n\tfor _, tag := range tags {\n\t\tif strings.HasPrefix(tag, TagInstanceGroup) {\n\t\t\treturn strings.TrimPrefix(tag, TagInstanceGroup+\"=\")\n\t\t}","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/utils.go#L45-L81","documentation":"ParseRegionFromZone failed: after stripping the numeric suffix from the zone (e.g. 'fr-par-1' -> 'fr-par'), scw.ParseRegion rejected the result. Means the cluster spec carries a malformed or unknown zone string that doesn't map to a Scaleway region.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/scaleway/utils.go:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Correct the zone in the cluster spec to a valid Scaleway zone like fr-par-1 or nl-ams-2","Check the wrapped error for the exact parse failure","Update kOps/SDK if the zone is new and unsupported by the vendored SDK"],"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"}