Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/priciples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions e2e/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down
3 changes: 2 additions & 1 deletion e2e/live_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/endpoints/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/api/endpoints/endpoints_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
2 changes: 1 addition & 1 deletion internal/config/region/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
}

Expand Down
6 changes: 3 additions & 3 deletions internal/config/region/region_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion internal/telemetrybackend/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}{
Expand Down
4 changes: 2 additions & 2 deletions internal/telemetrybackend/event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Loading