Update TI_FS_TOKEN instruction in quick start guide - #23955
guangleibao wants to merge 1 commit into
Conversation
Clarified instructions for setting TI_FS_TOKEN in different environments.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 📝 WalkthroughWalkthroughThe TiDB Cloud Filesystem quick-start comments out the ChangesQuick-start documentation
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Change: Other Merge Risk: 🔵 Low · up to Readers using a new environment without a stored filesystem credential may be unable to complete the mount as documented. This is a bounded documentation issue with a straightforward correction. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description explains the documentation change and uses the repository template, but it does not select the affected TiDB version. The PR objectives identify the release-8.5 branch, while all version checkboxes remain unchecked.
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: a8f99e30-b737-4250-be4d-3239dddb4ccc
📒 Files selected for processing (1)
ai/ti/ti-quick-start.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.
|
|
||
| ```bash | ||
| export TI_FS_TOKEN="<owner-token>" # Skip this line if you are continuing in the same terminal as step 1, where TI_FS_TOKEN is already set. | ||
| # export TI_FS_TOKEN="<owner-token>" # If you are continuing on a different environment as step 1, pass in the TI_FS_TOKEN you get from step 1 here. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
git diff --no-ext-diff --unified=25 8503bb1394cc88fa56657dbd1675f90753a2e552 496b8d5c6f0084ec2dc0a5841f7a6cef8ce1ab10 -- ai/ti/ti-quick-start.md
sed -n '1,190p' ai/ti/ti-quick-start.md
sed -n '20,45p' ai/ti/reference/ti-fs-read-file.md
sed -n '45,80p' tidb-cloud-filesystem/manage-filesystem-tokens.md
rg -n 'TI_FS_TOKEN|fs-token|token' ai/ti tidb-cloud-filesystemRepository: pingcap/docs
Length of output: 41310
🏁 Script executed:
#!/bin/bash
set -o pipefail
printf '%s\n' '--- quick-start diff and relevant lines ---'
git diff --no-ext-diff --unified=12 8503bb1394cc88fa56657dbd1675f90753a2e552 496b8d5c6f0084ec2dc0a5841f7a6cef8ce1ab10 -- ai/ti/ti-quick-start.md
printf '%s\n' '--- access guide ---'
cat -n tidb-cloud-filesystem/access-filesystem.md
printf '%s\n' '--- mount docs and references mentioning credential fallback ---'
rg -n -C 5 'mount-file-system|TI_FS_TOKEN|local token|API key|fs-token|credential' tidb-cloud-filesystem ai/ti/reference ai/ti/guides | head -n 320
printf '%s\n' '--- repository implementation or contract references ---'
rg -n -C 4 'mount-file-system|resolve.*token|token.*precedence|TI_FS_TOKEN|local.*token' --glob '!node_modules/**' --glob '!dist/**' .Repository: pingcap/docs
Length of output: 42051
🤖 get_repo_knowledge executed:
get_repo_knowledge pingcap/docs /tmp/coderabbit-repo-knowledge/pingcap-docs-9c73f70c
Length of output: 876
Provide a token when the environment has no local credential.
The CLI can use a locally stored token, so TI_FS_TOKEN is optional on a machine with that credential. A new environment without a local credential needs the token. The proposed prompt should run only in an interactive terminal so injected secrets and non-interactive agent workflows continue to work.
Suggested fix
- # export TI_FS_TOKEN="<owner-token>" # If you are continuing on a different environment as step 1, pass in the TI_FS_TOKEN you get from step 1 here.
+ if [ -z "${TI_FS_TOKEN:-}" ] && [ -t 0 ]; then
+ read -r -s -p "Enter the owner token from step 1: " TI_FS_TOKEN
+ echo
+ export TI_FS_TOKEN
+ fi📝 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.
| # export TI_FS_TOKEN="<owner-token>" # If you are continuing on a different environment as step 1, pass in the TI_FS_TOKEN you get from step 1 here. | |
| if [ -z "${TI_FS_TOKEN:-}" ] && [ -t 0 ]; then | |
| read -r -s -p "Enter the owner token from step 1: " TI_FS_TOKEN | |
| echo | |
| export TI_FS_TOKEN | |
| fi |
Clarified instructions for setting TI_FS_TOKEN in different environments.
First-time contributors' checklist
What is changed, added, or deleted? (Required)
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
TI_FS_TOKENsetup as a commented command for users continuing in a different environment.