Skip to content

Commit 09bcd4e

Browse files
authored
Update link checker config and fix some broken links (pingcap#22601)
1 parent fafaddd commit 09bcd4e

10 files changed

Lines changed: 35 additions & 20 deletions

.github/workflows/link-fail-fast.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
linkChecker:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v6
1111
with:
1212
fetch-depth: 2
1313

@@ -17,12 +17,19 @@ jobs:
1717
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g")
1818
echo "all_changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT
1919
20+
- name: Restore lychee cache
21+
uses: actions/cache@v4
22+
with:
23+
path: .lycheecache
24+
key: cache-lychee-${{ github.sha }}
25+
restore-keys: cache-lychee-
26+
2027
- name: Link Checker
2128
if: ${{ steps.changed-files.outputs.all_changed_files }}
22-
uses: lycheeverse/lychee-action@v2.3.0
29+
uses: lycheeverse/lychee-action@v2
2330
with:
2431
fail: true
2532
failIfEmpty: false
26-
args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
33+
args: --root-dir $(pwd) --cache --max-cache-age 1d -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
2734
env:
2835
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/link.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,34 @@ jobs:
1111
if: github.repository == 'pingcap/docs'
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515

1616
- name: Download Exclude Path
1717
run: |
1818
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore
1919
20+
- name: Restore lychee cache
21+
uses: actions/cache@v4
22+
with:
23+
path: .lycheecache
24+
key: cache-lychee-${{ github.sha }}
25+
restore-keys: cache-lychee-
26+
2027
- name: Check Links
21-
uses: lycheeverse/lychee-action@v1.6.1
28+
uses: lycheeverse/lychee-action@v2
2229
with:
2330
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
2431
# Accept 429 for now due to github rate limit.
2532
# See https://github.com/lycheeverse/lychee/issues/634
26-
args: -E --exclude-mail -i -n -t 45 -- **/*.md *.md
33+
fail: true
34+
failIfEmpty: false
35+
args: --root-dir $(pwd) --cache --max-cache-age 8d -E -i -n -t 45 --exclude-path '^releases/' --exclude-path '^tidb-cloud/releases/' -- **/*.md *.md
2736
output: out.md
2837
env:
2938
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3039

3140
- name: Create Issue From File
32-
uses: peter-evans/create-issue-from-file@v4
41+
uses: peter-evans/create-issue-from-file@v6
3342
with:
3443
title: Broken Link Detected
3544
content-filepath: out.md

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ out
1111
gen
1212
.DS_Store
1313
*.swp
14-
1514
/node_modules/
16-
1715
tmp/
16+
.lycheecache

ai/integrations/vector-search-integrate-with-langchain.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/ve
1515
1616
> **Tip**
1717
>
18-
> You can view the complete [sample code](https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) in Jupyter Notebook, or run it directly in the [Colab](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) online environment.
18+
> You can view the complete [sample code](https://docs.langchain.com/oss/python/integrations/vectorstores/tidb_vector) in LangChain documentation.
1919
2020
## Prerequisites
2121

@@ -148,11 +148,11 @@ The following are descriptions for each parameter:
148148

149149
#### Step 4.1 Download the sample document
150150

151-
In your project directory, create a directory named `data/how_to/` and download the sample document [`state_of_the_union.txt`](https://github.com/langchain-ai/langchain/blob/master/docs/docs/how_to/state_of_the_union.txt) from the [langchain-ai/langchain](https://github.com/langchain-ai/langchain) GitHub repository.
151+
In your project directory, create a directory named `data/how_to/` and download the sample document [`state_of_the_union.txt`](https://github.com/langchain-ai/langchainjs/blob/main/examples/state_of_the_union.txt) from the [langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs) GitHub repository.
152152

153153
```shell
154154
!mkdir -p 'data/how_to/'
155-
!wget 'https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/docs/how_to/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
155+
!wget 'https://raw.githubusercontent.com/langchain-ai/langchainjs/refs/heads/main/examples/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
156156
```
157157

158158
#### Step 4.2 Load and split the document

ai/integrations/vector-search-integrate-with-llamaindex.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/ve
1515
1616
> **Tip**
1717
>
18-
> You can view the complete [sample code](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) in Jupyter Notebook, or run it directly in the [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) online environment.
18+
> You can view the complete [sample code](https://github.com/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb) in Jupyter Notebook, or run it directly in the [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb) online environment.
1919
2020
## Prerequisites
2121

@@ -147,11 +147,11 @@ The following are descriptions for each parameter:
147147

148148
#### Step 4.1 Download the sample document
149149

150-
In your project directory, create a directory named `data/paul_graham/` and download the sample document [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt) from the [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub repository.
150+
In your project directory, create a directory named `data/paul_graham/` and download the sample document [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/examples/data/paul_graham/paul_graham_essay.txt) from the [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub repository.
151151

152152
```shell
153153
!mkdir -p 'data/paul_graham/'
154-
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
154+
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
155155
```
156156

157157
#### Step 4.2 Load the document

garbage-collection-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In the default configuration, GC is triggered every 10 minutes. Each GC retains
2424

2525
### Resolve Locks
2626

27-
The TiDB transaction model is implemented based on [Google's Percolator](https://ai.google/research/pubs/pub36726). It's mainly a two-phase commit protocol with some practical optimizations. When the first phase is finished, all the related keys are locked. Among these locks, one is the primary lock and the others are secondary locks which contain a pointer to the primary lock; in the second phase, the key with the primary lock gets a write record and its lock is removed. The write record indicates the write or delete operation in the history or the transactional rollback record of this key. The type of write record that replaces the primary lock indicates whether the corresponding transaction is committed successfully. Then all the secondary locks are replaced successively. If, for some reason such as failure, these secondary locks are retained and not replaced, you can still find the primary key based on the information in the secondary locks and determines whether the entire transaction is committed based on whether the primary key is committed. However, if the primary key information is cleared by GC and this transaction has uncommitted secondary locks, you will never learn whether these locks can be committed. As a result, data integrity cannot be guaranteed.
27+
The TiDB transaction model is implemented based on [Google's Percolator](https://research.google/pubs/large-scale-incremental-processing-using-distributed-transactions-and-notifications/). It's mainly a two-phase commit protocol with some practical optimizations. When the first phase is finished, all the related keys are locked. Among these locks, one is the primary lock and the others are secondary locks which contain a pointer to the primary lock; in the second phase, the key with the primary lock gets a write record and its lock is removed. The write record indicates the write or delete operation in the history or the transactional rollback record of this key. The type of write record that replaces the primary lock indicates whether the corresponding transaction is committed successfully. Then all the secondary locks are replaced successively. If, for some reason such as failure, these secondary locks are retained and not replaced, you can still find the primary key based on the information in the secondary locks and determines whether the entire transaction is committed based on whether the primary key is committed. However, if the primary key information is cleared by GC and this transaction has uncommitted secondary locks, you will never learn whether these locks can be committed. As a result, data integrity cannot be guaranteed.
2828

2929
The Resolve Locks step clears the locks before the safe point. This means that if the primary key of a lock is committed, this lock needs to be committed; otherwise, it needs to be rolled back. If the primary key is still locked (not committed or rolled back), this transaction is seen as timing out and rolled back.
3030

ticdc/ticdc-sink-to-kafka.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ token="xxxx"
211211

212212
In the above configuration, `region` and `registry-name` are required fields, while `access-key`, `secret-access-key`, and `token` are optional fields. The best practice is to set the AWS credentials as environment variables or store them in the `~/.aws/credentials` file instead of setting them in the changefeed configuration file.
213213

214-
For more information, refer to the [official AWS SDK for Go V2 documentation](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials).
214+
For more information, refer to the [official AWS SDK for Go V2 documentation](https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-gosdk.html#specifying-credentials).
215215

216216
## Customize the rules for Topic and Partition dispatchers of Kafka Sink
217217

tidb-cloud/data-service-integrations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ To integrate your Data App with GPTs, perform the following steps:
3535

3636
## Integrate your Data App with Dify
3737

38-
You can integrate your Data App with [Dify](https://docs.dify.ai/guides/tools) to enhance your applications with intelligent capabilities, such as vector distance calculations, advanced similarity searches, and vector analysis.
38+
You can integrate your Data App with [Dify](https://docs.dify.ai/en/use-dify/nodes/tools) to enhance your applications with intelligent capabilities, such as vector distance calculations, advanced similarity searches, and vector analysis.
3939

4040
To integrate your Data App with Dify, follow the same steps as for [GPTs integration](#integrate-your-data-app-with-gpts). The only difference is that on the **Integrations** tab, you need to click **Get Configuration** in the **Integrate with Dify** area.

tidb-cloud/integrate-tidbcloud-with-zapier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This guide gives a high-level introduction to the TiDB Cloud app on Zapier and a
1717

1818
## Quick start with template
1919

20-
[Zap Templates](https://platform.zapier.com/partners/zap-templates) are ready made integrations or Zaps with the apps and core fields pre-selected, for publicly available Zapier integrations.
20+
[Zap Templates](https://docs.zapier.com/platform/publish/zap-templates) are ready made integrations or Zaps with the apps and core fields pre-selected, for publicly available Zapier integrations.
2121

2222
In this section, we will use the **Add new Github global events to TiDB rows** template as an example to create a workflow. In this workflow, every time a new global event (any [GitHub event](https://docs.github.com/en/developers/webhooks-and-events/events/github-event-types) happens from or to you, on any repo) is created from your GitHub account, Zapier adds a new row to your TiDB Cloud cluster.
2323

tidb-cloud/monitor-alert-flashduty.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To receive alert notifications of clusters, take the following steps:
2323

2424
### Step 1. Generate a Flashduty webhook URL
2525

26-
1. Generate a webhook URL by following the instructions in [Flashduty Prometheus Integration](https://docs.flashcat.cloud/en/flashduty/prometheus-integration-guide).
26+
1. Generate a webhook URL by following the instructions in [Flashduty Prometheus Integration](https://docs.flashcat.cloud/en/on-call/integration/alert-integration/alert-sources/prometheus).
2727
2. Save the generated webhook URL to use in the next step.
2828

2929
### Step 2. Subscribe from TiDB Cloud

0 commit comments

Comments
 (0)