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
1 change: 1 addition & 0 deletions ai/ti/reference/ti-regions-security-and-limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following table lists the supported regions for TiDB Cloud CLI and shows whi
| 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 |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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 scripts

Repository: 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]}")
PY

Repository: 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()
PY

Repository: 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))
PY

Repository: 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.

Suggested change
| 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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ TiDB Cloud Filesystem is available only in the regions and environments listed b
| AWS | Singapore | `aws-ap-southeast-1` |
| Alibaba Cloud | Singapore | `alicloud-ap-southeast-1` |
| Google Cloud | South Carolina | `gcp-us-east1` |
| Microsoft Azure | Central US | `azure-centralus` |

TiDB Cloud Starter also supports some regions where TiDB Cloud Filesystem is not available. A file system command in one of those regions fails and displays an error indicating that the service is not available for that region, and lists the regions that are supported. Supported file system regions are built into each `ti` release. If support for a region was added after your installed version was released, upgrade `ti`; specifying a service URL cannot enable support for that region.

Expand Down
Loading