Repository navigation
ai/ti: document GCP and Azure Filesystem regions - #24457
Conversation
Signed-off-by: siddon <siddontang@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository: pingcap/docs/.coderabbit.yaml
- Review profile: ASSERTIVE
- Plan: Advanced
- Run ID:
397bed41-470a-4858-8193-b16c33bd4122
📒 Files selected for processing: 1
ai/ti/reference/ti-regions-security-and-limitations.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
| | AWS | Tokyo | `aws-ap-northeast-1` | Supported | Not supported | | ||
| | Alibaba Cloud | Singapore | `alicloud-ap-southeast-1` | Supported | Supported | | ||
| | Google Cloud | South Carolina | `gcp-us-east1` | Not supported | Supported | | ||
| | Microsoft Azure | Central US | `azure-centralus` | Not supported | Supported | |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
sed -n '20,38p' ai/ti/reference/ti-regions-security-and-limitations.md
rg -n -i 'azure-centralus|drive9|region.*ti release|filesystem region|--region' ai/ti scriptsRepository: pingcap/docs
Length of output: 5194
🌐 Web query:
tidbcloud ti-cli v0.2.9 azure-centralus endpoint mapping release
💡 Result:
I couldn’t verify an **Azure `centralus` endpoint mapping** in **ti-cli v0.2.9**. The release notes identify v0.2.9 as a mount-readiness patch and don’t mention Azure regions or endpoint mappings. ([github.com](https://github.com/tidbcloud/ti-cli/releases/tag/v0.2.9))
The available repository guidance describes endpoint resolution from canonical region codes and lists supported MVP placements—but no Azure region. That guidance is for the repository’s current state, not necessarily the v0.2.9 tag, so it doesn’t establish the exact mapping in that release. ([github.com](https://github.com/tidbcloud/ti-cli/blob/main/AGENTS.md?utm_source=openai))
**Unresolved:** whether v0.2.9 maps `azure-centralus` to any endpoint. The closest source is the [v0.2.9 release page](https://github.com/tidbcloud/ti-cli/releases/tag/v0.2.9); its published notes don’t answer that mapping question.
Citations:
- 1: https://github.com/tidbcloud/ti-cli/releases/tag/v0.2.9
- 2: https://github.com/tidbcloud/ti-cli/blob/main/AGENTS.md?utm_source=openai
🏁 Script executed:
set -eu
python3 - <<'PY'
import json
import urllib.request
base = "https://api.github.com/repos/tidbcloud/ti-cli"
headers = {"Accept": "application/vnd.github+json", "User-Agent": "review-inspection"}
def get(url):
req = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(req) as r:
return json.load(r)
tree = get(base + "/git/trees/v0.2.9?recursive=1")
paths = [
item["path"] for item in tree.get("tree", [])
if item.get("type") == "blob"
and any(term in item["path"].lower() for term in ("region", "endpoint", "drive9", "filesystem", "fs"))
]
print("candidate paths:")
for path in paths:
print(path)
print("\nmatching source excerpts:")
for path in paths:
url = f"https://raw.githubusercontent.com/tidbcloud/ti-cli/v0.2.9/{path}"
try:
req = urllib.request.Request(url, headers={"User-Agent": "review-inspection"})
with urllib.request.urlopen(req) as r:
text = r.read().decode("utf-8", "replace")
except Exception:
continue
lines = text.splitlines()
hits = [
(i + 1, line) for i, line in enumerate(lines)
if any(term in line.lower() for term in ("azure-centralus", "gcp-us-east1", "drive9.ai", "endpoint"))
]
if hits:
print(f"\n--- {path} ---")
for number, line in hits:
start = max(1, number - 3)
end = min(len(lines), number + 3)
for n in range(start, end + 1):
print(f"{n}: {lines[n-1]}")
PYRepository: pingcap/docs
Length of output: 42387
🏁 Script executed:
set -eu
python3 - <<'PY'
import urllib.request
base = "https://raw.githubusercontent.com/tidbcloud/ti-cli/v0.2.9/"
for path in ("internal/api/endpoints/endpoints.go", "internal/config/region/region.go", "internal/fswrap/runner.go"):
url = base + path
req = urllib.request.Request(url, headers={"User-Agent": "review-inspection"})
with urllib.request.urlopen(req) as response:
lines = response.read().decode("utf-8", "replace").splitlines()
print(f"\n--- {path} ---")
for i, line in enumerate(lines, 1):
low = line.lower()
if any(term in low for term in ("azure", "centralus", "gcp-us-east1", "drive9.ai", "unsupported", "resolvefs", "fsbaseurls", "fallback")):
for n in range(max(1, i - 3), min(len(lines), i + 5) + 1):
print(f"{n}: {lines[n-1]}")
print()
PYRepository: pingcap/docs
Length of output: 9245
🏁 Script executed:
set -eu
python3 - <<'PY'
import json
import urllib.request
base = "https://raw.githubusercontent.com/tidbcloud/ti-cli/v0.2.9/"
path = "internal/api/endpoints/endpoints.go"
req = urllib.request.Request(base + path, headers={"User-Agent": "review-inspection"})
with urllib.request.urlopen(req) as response:
lines = response.read().decode("utf-8", "replace").splitlines()
print(f"--- {path} ---")
for start, end in ((1, 75), (135, 235), (253, 325)):
print(f"\n[{start}-{end}]")
for n in range(start, min(end, len(lines)) + 1):
print(f"{n}: {lines[n-1]}")
print("\n--- hosted manifest ---")
manifest_url = "https://drive9.ai/manifest/regions/drive9-regions.json"
req = urllib.request.Request(manifest_url, headers={"User-Agent": "review-inspection"})
with urllib.request.urlopen(req) as response:
manifest = json.load(response)
print(json.dumps(manifest, indent=2, sort_keys=True))
PYRepository: pingcap/docs
Length of output: 10587
Remove azure-centralus until a released CLI includes its mapping.
ti v0.2.9 uses its built-in Filesystem manifest by default. That manifest includes gcp-us-east1, but not azure-centralus. Filesystem commands therefore return api.fs_endpoint_unsupported instead of using the documented region. The manifest URL override is limited to test endpoints and is not a supported user configuration.
Suggested fix
--- "a/ai/ti/reference/ti-regions-security-and-limitations.md"
+++ "b/ai/ti/reference/ti-regions-security-and-limitations.md"
@@ -26,7 +26,6 @@
| AWS | Tokyo | `aws-ap-northeast-1` | Supported | Not supported |
| Alibaba Cloud | Singapore | `alicloud-ap-southeast-1` | Supported | Supported |
| Google Cloud | South Carolina | `gcp-us-east1` | Not supported | Supported |
-| Microsoft Azure | Central US | `azure-centralus` | Not supported | Supported |
If your configured region supports TiDB Cloud Starter but not TiDB Cloud Filesystem, you can manage Starter instances in that region. File system commands fail with an `unsupported endpoint` error.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Microsoft Azure | Central US | `azure-centralus` | Not supported | Supported | |
|
Let's hold this PR until tidbcloud/ti-cli#76 is merged and built. Btw, the GCP support was also included in edff78c (this PR is supposed to be merged later today along with the public preview of the Filesystem console part). |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiancai The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What is changed, added or deleted? (Required)
Add the Google Cloud
gcp-us-east1and Microsoft Azureazure-centralusplacements to the TiDB Cloud CLI region table. Both support Filesystem operations; neither is listed as a supported Starter database placement.The Azure CLI implementation and regression tests are in tidbcloud/ti-cli#76. Validate the region table against the built-in CLI endpoint mapping.
Validation:
./scripts/markdownlint ai/ti/reference/ti-regions-security-and-limitations.mdandgit diff --checkpass.Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
azure-centralus). TiDB Cloud Filesystem is supported in this region; TiDB Cloud Starter is not.