diff --git a/AGENTS.md b/AGENTS.md index 65486e6..2a2ec4e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1000,7 +1000,7 @@ Supported MVP placement values: | `aws-ap-northeast-1` | AWS | Tokyo | | `aws-ap-southeast-1` | AWS | Singapore | | `alicloud-ap-southeast-1` | Alibaba Cloud | Singapore | -| `gcp-us-east-1` | Google Cloud | South Carolina | +| `gcp-us-east1` | Google Cloud | South Carolina | The prefix before the first `-` is the cloud provider selector. `aws` maps to internal provider `aws`; `alicloud` maps to internal provider diff --git a/README.md b/README.md index b028fc3..f65cfc8 100644 --- a/README.md +++ b/README.md @@ -102,8 +102,8 @@ Automation should move to `TI_*` and `TIDB_CLOUD_*` environment variables. The v ### Configure - Authentication: a TiDB Cloud Public Key and a Private Key from the [TiDB Cloud API Keys](https://tidbcloud.com/org-settings/api-keys) console. When either credential is missing, `ti` links to this page in its authentication error before suggesting `ti configure` or the corresponding environment variables. -- Default region: one of aws-us-east-1, aws-us-west-2, aws-eu-central-1, aws-ap-northeast-1, aws-ap-southeast-1, alicloud-ap-southeast-1, or gcp-us-east-1. - - Regions supporting TiDB Cloud Filesystem: aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, or gcp-us-east-1. These endpoints are built into `ti`; endpoint resolution does not download a Drive9 region manifest. +- Default region: one of aws-us-east-1, aws-us-west-2, aws-eu-central-1, aws-ap-northeast-1, aws-ap-southeast-1, alicloud-ap-southeast-1, or gcp-us-east1. + - Regions supporting TiDB Cloud Filesystem: aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, or gcp-us-east1. These endpoints are built into `ti`; endpoint resolution does not download a Drive9 region manifest. - Regions supporting TiDB Cloud Starter: aws-us-east-1, aws-us-west-2, aws-eu-central-1, aws-ap-northeast-1, aws-ap-southeast-1, or alicloud-ap-southeast-1. Set up a default profile with one command: diff --git a/docs/priciples.md b/docs/priciples.md index de24a9a..e7ec695 100644 --- a/docs/priciples.md +++ b/docs/priciples.md @@ -77,7 +77,7 @@ Supported TiDB Cloud Starter placement values are: | `aws-ap-southeast-1` | AWS | Singapore | | `alicloud-ap-southeast-1` | Alibaba Cloud | Singapore | -`aws` maps to the internal provider `aws`; `alicloud` maps to `alibaba_cloud`; `gcp` maps to `gcp`. TiDB Cloud Filesystem supports `aws-us-east-1`, `aws-ap-southeast-1`, `aws-us-west-2`, `alicloud-ap-southeast-1`, and `gcp-us-east-1` through endpoint mappings built into `ti`. +`aws` maps to the internal provider `aws`; `alicloud` maps to `alibaba_cloud`; `gcp` maps to `gcp`. TiDB Cloud Filesystem supports `aws-us-east-1`, `aws-ap-southeast-1`, `aws-us-west-2`, `alicloud-ap-southeast-1`, and `gcp-us-east1` through endpoint mappings built into `ti`. ## TiDB Cloud Authentication diff --git a/e2e/installer_test.go b/e2e/installer_test.go index a9e94f5..476677e 100644 --- a/e2e/installer_test.go +++ b/e2e/installer_test.go @@ -208,7 +208,7 @@ fi t.Fatalf("installer did not validate companion command surface %q; calls:\n%s", want, companionCallData) } } - for _, regionCode := range []string{"aws-us-east-1", "aws-ap-southeast-1", "aws-us-west-2", "alicloud-ap-southeast-1", "gcp-us-east-1"} { + for _, regionCode := range []string{"aws-us-east-1", "aws-ap-southeast-1", "aws-us-west-2", "alicloud-ap-southeast-1", "gcp-us-east1"} { if !strings.Contains(string(output), regionCode) { t.Fatalf("installer did not list ti fs region %q:\n%s", regionCode, output) } @@ -294,7 +294,7 @@ func TestInstallersUseProductOwnedFSRegionsAndHideCompanionPath(t *testing.T) { if strings.Contains(content, "ti fs companion installed to") { t.Fatalf("%s still reports the companion installation path", path) } - for _, regionCode := range []string{"aws-us-east-1", "aws-ap-southeast-1", "aws-us-west-2", "alicloud-ap-southeast-1", "gcp-us-east-1"} { + for _, regionCode := range []string{"aws-us-east-1", "aws-ap-southeast-1", "aws-us-west-2", "alicloud-ap-southeast-1", "gcp-us-east1"} { if !strings.Contains(content, regionCode) { t.Fatalf("%s does not list ti fs region %q", path, regionCode) } diff --git a/e2e/live_test.go b/e2e/live_test.go index e428878..ea52519 100644 --- a/e2e/live_test.go +++ b/e2e/live_test.go @@ -730,7 +730,8 @@ func resolveLiveFSResourceByID(t *testing.T, profile *config.Profile, fileSystem func isLiveFSQuotaError(message string) bool { message = strings.ToLower(message) return strings.Contains(message, "maximum number of free clusters") || - strings.Contains(message, "quota or capacity limit") + strings.Contains(message, "quota or capacity limit") || + strings.Contains(message, "filesystem limit reached") } func TestLiveFSDataPlaneLifecycle(t *testing.T) { diff --git a/internal/api/endpoints/endpoints.go b/internal/api/endpoints/endpoints.go index 18430ca..b184727 100644 --- a/internal/api/endpoints/endpoints.go +++ b/internal/api/endpoints/endpoints.go @@ -245,7 +245,7 @@ func builtInFSRegionManifest() *FSRegionManifest { {RegionCode: "aws-ap-southeast-1", Mode: DefaultFSMode, ServerURL: "https://aws-ap-southeast-1.drive9.ai", CloudProvider: "aws", TiDBRegion: "ap-southeast-1"}, {RegionCode: "aws-us-west-2", Mode: DefaultFSMode, ServerURL: "https://aws-us-west-2.drive9.ai", CloudProvider: "aws", TiDBRegion: "us-west-2"}, {RegionCode: "alicloud-ap-southeast-1", Mode: DefaultFSMode, ServerURL: "https://alicloud-ap-southeast-1.drive9.ai", CloudProvider: "alicloud", TiDBRegion: "ap-southeast-1"}, - {RegionCode: "gcp-us-east-1", Mode: DefaultFSMode, ServerURL: "https://gcp-us-east1.drive9.ai", CloudProvider: "gcp", TiDBRegion: "us-east-1"}, + {RegionCode: "gcp-us-east1", Mode: DefaultFSMode, ServerURL: "https://gcp-us-east1.drive9.ai", CloudProvider: "gcp", TiDBRegion: "us-east1"}, }, } } diff --git a/internal/api/endpoints/endpoints_test.go b/internal/api/endpoints/endpoints_test.go index fdf9a41..159d268 100644 --- a/internal/api/endpoints/endpoints_test.go +++ b/internal/api/endpoints/endpoints_test.go @@ -159,7 +159,7 @@ func TestResolveFSUsesBuiltInRegionMapping(t *testing.T) { {name: "AWS Singapore", provider: region.ProviderAWS, regionCode: "ap-southeast-1", baseURL: "https://aws-ap-southeast-1.drive9.ai", regionName: "aws-ap-southeast-1"}, {name: "AWS Oregon", provider: region.ProviderAWS, regionCode: "us-west-2", baseURL: "https://aws-us-west-2.drive9.ai", regionName: "aws-us-west-2"}, {name: "Alibaba Cloud Singapore", provider: region.ProviderAlibabaCloud, regionCode: "ap-southeast-1", baseURL: "https://alicloud-ap-southeast-1.drive9.ai", regionName: "alicloud-ap-southeast-1"}, - {name: "GCP South Carolina", provider: region.ProviderGCP, regionCode: "us-east-1", baseURL: "https://gcp-us-east1.drive9.ai", regionName: "gcp-us-east-1"}, + {name: "GCP South Carolina", provider: region.ProviderGCP, regionCode: "us-east1", baseURL: "https://gcp-us-east1.drive9.ai", regionName: "gcp-us-east1"}, } resolver := NewResolver() if resolver.FSManifestURL != "" { diff --git a/internal/config/region/region.go b/internal/config/region/region.go index c38075e..61b3beb 100644 --- a/internal/config/region/region.go +++ b/internal/config/region/region.go @@ -43,7 +43,7 @@ var supported = map[string][]Region{ {Code: "ap-southeast-1", Label: "Singapore"}, }, ProviderGCP: { - {Code: "us-east-1", Label: "South Carolina"}, + {Code: "us-east1", Label: "South Carolina"}, }, } diff --git a/internal/config/region/region_test.go b/internal/config/region/region_test.go index bc5be2f..50208dc 100644 --- a/internal/config/region/region_test.go +++ b/internal/config/region/region_test.go @@ -13,7 +13,7 @@ func TestValidateSupportedProviderRegions(t *testing.T) { {ProviderAWS, "ap-northeast-1"}, {ProviderAWS, "ap-southeast-1"}, {ProviderAlibabaCloud, "ap-southeast-1"}, - {ProviderGCP, "us-east-1"}, + {ProviderGCP, "us-east1"}, } for _, tt := range tests { @@ -55,7 +55,7 @@ func TestParsePlacementCode(t *testing.T) { {"aws-ap-southeast-1", "aws-ap-southeast-1", ProviderAWS, "ap-southeast-1"}, {"alicloud-ap-southeast-1", "alicloud-ap-southeast-1", ProviderAlibabaCloud, "ap-southeast-1"}, {"ali-ap-southeast-1", "alicloud-ap-southeast-1", ProviderAlibabaCloud, "ap-southeast-1"}, - {"gcp-us-east-1", "gcp-us-east-1", ProviderGCP, "us-east-1"}, + {"gcp-us-east1", "gcp-us-east1", ProviderGCP, "us-east1"}, } for _, tt := range tests { @@ -72,7 +72,7 @@ func TestParsePlacementCode(t *testing.T) { } func TestParsePlacementCodeRejectsUnsupportedValues(t *testing.T) { - for _, code := range []string{"us-east-1", "ali-us-east-1", "gcp-us-east1"} { + for _, code := range []string{"us-east-1", "ali-us-east-1", "gcp-us-east-1"} { t.Run(code, func(t *testing.T) { if _, err := ParsePlacementCode(code); err == nil { t.Fatal("expected placement code to be rejected") diff --git a/internal/telemetrybackend/event.go b/internal/telemetrybackend/event.go index af305ea..99a9743 100644 --- a/internal/telemetrybackend/event.go +++ b/internal/telemetrybackend/event.go @@ -71,7 +71,7 @@ var allowedRegions = map[string]struct{}{ "aws-ap-southeast-1": {}, "ali-ap-southeast-1": {}, "alicloud-ap-southeast-1": {}, - "gcp-us-east-1": {}, + "gcp-us-east1": {}, } var allowedOperatingSystems = map[string]struct{}{ diff --git a/internal/telemetrybackend/event_test.go b/internal/telemetrybackend/event_test.go index e579264..58de5ea 100644 --- a/internal/telemetrybackend/event_test.go +++ b/internal/telemetrybackend/event_test.go @@ -29,7 +29,7 @@ func TestDecodeAndValidateBatchAcceptsGCPPlacement(t *testing.T) { } event := request["events"].([]any)[0].(map[string]any) event["cloud_provider"] = "gcp" - event["region_code"] = "gcp-us-east-1" + event["region_code"] = "gcp-us-east1" body, err := json.Marshal(request) if err != nil { t.Fatal(err) @@ -38,7 +38,7 @@ func TestDecodeAndValidateBatchAcceptsGCPPlacement(t *testing.T) { if err != nil { t.Fatalf("gcp placement should be accepted: %v", err) } - if len(events) != 1 || events[0].CloudProvider != "gcp" || events[0].RegionCode != "gcp-us-east-1" { + if len(events) != 1 || events[0].CloudProvider != "gcp" || events[0].RegionCode != "gcp-us-east1" { t.Fatalf("unexpected gcp event: %#v", events) } } diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 8188450..3374fef 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -116,7 +116,7 @@ function Print-Regions { Write-Output " alicloud-ap-southeast-1" Write-Output "" Write-Output " ti fs regions:" - Write-Output " aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, gcp-us-east-1" + Write-Output " aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, gcp-us-east1" } function Print-NextSteps { diff --git a/scripts/install.sh b/scripts/install.sh index 4fc6d6e..4930dbb 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -279,7 +279,7 @@ print_regions() { printf " alicloud-ap-southeast-1\n" printf "\n" printf " ${BOLD}ti fs regions:${RESET}\n" - printf " aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, gcp-us-east-1\n" + printf " aws-us-east-1, aws-ap-southeast-1, aws-us-west-2, alicloud-ap-southeast-1, gcp-us-east1\n" } print_next_steps() {