diff --git a/.github/workflows/link-fail-fast.yaml b/.github/workflows/link-fail-fast.yaml index 226c66716c942..ede0b16ba6086 100644 --- a/.github/workflows/link-fail-fast.yaml +++ b/.github/workflows/link-fail-fast.yaml @@ -7,7 +7,7 @@ jobs: linkChecker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 2 @@ -17,12 +17,19 @@ jobs: CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g") echo "all_changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT + - name: Restore lychee cache + uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + - name: Link Checker if: ${{ steps.changed-files.outputs.all_changed_files }} - uses: lycheeverse/lychee-action@v2.3.0 + uses: lycheeverse/lychee-action@v2 with: fail: true failIfEmpty: false - args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}' + args: --root-dir $(pwd) --cache --max-cache-age 1d -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}' env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/link.yaml b/.github/workflows/link.yaml index 692b0e794f041..efda2c4c766f1 100644 --- a/.github/workflows/link.yaml +++ b/.github/workflows/link.yaml @@ -11,25 +11,34 @@ jobs: if: github.repository == 'pingcap/docs' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Download Exclude Path run: | curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore + - name: Restore lychee cache + uses: actions/cache@v4 + with: + path: .lycheecache + key: cache-lychee-${{ github.sha }} + restore-keys: cache-lychee- + - name: Check Links - uses: lycheeverse/lychee-action@v1.6.1 + uses: lycheeverse/lychee-action@v2 with: # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters # Accept 429 for now due to github rate limit. # See https://github.com/lycheeverse/lychee/issues/634 - args: -E --exclude-mail -i -n -t 45 -- **/*.md *.md + fail: true + failIfEmpty: false + args: --root-dir $(pwd) --cache --max-cache-age 8d -E -i -n -t 45 --exclude-path '^releases/' --exclude-path '^tidb-cloud/releases/' -- **/*.md *.md output: out.md env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Create Issue From File - uses: peter-evans/create-issue-from-file@v4 + uses: peter-evans/create-issue-from-file@v6 with: title: Broken Link Detected content-filepath: out.md diff --git a/.gitignore b/.gitignore index bbf3d54d032cc..e549d9c66a805 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ out gen .DS_Store *.swp - /node_modules/ - tmp/ +.lycheecache diff --git a/ai/integrations/vector-search-integrate-with-langchain.md b/ai/integrations/vector-search-integrate-with-langchain.md index 201904fb49fba..db3df119d99b1 100644 --- a/ai/integrations/vector-search-integrate-with-langchain.md +++ b/ai/integrations/vector-search-integrate-with-langchain.md @@ -15,7 +15,7 @@ This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/ve > **Tip** > -> 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. +> You can view the complete [sample code](https://docs.langchain.com/oss/python/integrations/vectorstores/tidb_vector) in LangChain documentation. ## Prerequisites @@ -148,11 +148,11 @@ The following are descriptions for each parameter: #### Step 4.1 Download the sample document -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. +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. ```shell !mkdir -p 'data/how_to/' -!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' +!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' ``` #### Step 4.2 Load and split the document diff --git a/ai/integrations/vector-search-integrate-with-llamaindex.md b/ai/integrations/vector-search-integrate-with-llamaindex.md index b9a20381b6101..617705e49873e 100644 --- a/ai/integrations/vector-search-integrate-with-llamaindex.md +++ b/ai/integrations/vector-search-integrate-with-llamaindex.md @@ -15,7 +15,7 @@ This tutorial demonstrates how to integrate [TiDB Vector Search](/ai/concepts/ve > **Tip** > -> 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. +> 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. ## Prerequisites @@ -147,11 +147,11 @@ The following are descriptions for each parameter: #### Step 4.1 Download the sample document -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. +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. ```shell !mkdir -p 'data/paul_graham/' -!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' +!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' ``` #### Step 4.2 Load the document diff --git a/garbage-collection-overview.md b/garbage-collection-overview.md index b4ac57ac6363b..9d4b873163713 100644 --- a/garbage-collection-overview.md +++ b/garbage-collection-overview.md @@ -24,7 +24,7 @@ In the default configuration, GC is triggered every 10 minutes. Each GC retains ### Resolve Locks -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. +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. 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. diff --git a/ticdc/ticdc-sink-to-kafka.md b/ticdc/ticdc-sink-to-kafka.md index e02db4b69c604..d6733e7772831 100644 --- a/ticdc/ticdc-sink-to-kafka.md +++ b/ticdc/ticdc-sink-to-kafka.md @@ -211,7 +211,7 @@ token="xxxx" 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. -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). +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). ## Customize the rules for Topic and Partition dispatchers of Kafka Sink diff --git a/tidb-cloud/data-service-integrations.md b/tidb-cloud/data-service-integrations.md index 362d66fe76414..ac3c432b2ab72 100644 --- a/tidb-cloud/data-service-integrations.md +++ b/tidb-cloud/data-service-integrations.md @@ -35,6 +35,6 @@ To integrate your Data App with GPTs, perform the following steps: ## Integrate your Data App with Dify -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. +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. 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. diff --git a/tidb-cloud/integrate-tidbcloud-with-zapier.md b/tidb-cloud/integrate-tidbcloud-with-zapier.md index 14c1a48c52032..9b5ae8cbd4496 100644 --- a/tidb-cloud/integrate-tidbcloud-with-zapier.md +++ b/tidb-cloud/integrate-tidbcloud-with-zapier.md @@ -17,7 +17,7 @@ This guide gives a high-level introduction to the TiDB Cloud app on Zapier and a ## Quick start with template -[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. +[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. 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. diff --git a/tidb-cloud/monitor-alert-flashduty.md b/tidb-cloud/monitor-alert-flashduty.md index 7792dcb6e39dc..3cf7db9b7893f 100644 --- a/tidb-cloud/monitor-alert-flashduty.md +++ b/tidb-cloud/monitor-alert-flashduty.md @@ -23,7 +23,7 @@ To receive alert notifications of clusters, take the following steps: ### Step 1. Generate a Flashduty webhook URL -1. Generate a webhook URL by following the instructions in [Flashduty Prometheus Integration](https://docs.flashcat.cloud/en/flashduty/prometheus-integration-guide). +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). 2. Save the generated webhook URL to use in the next step. ### Step 2. Subscribe from TiDB Cloud