From 60741461ef01037e20d06a363979bd05960f749f Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 10:56:27 +0800 Subject: [PATCH 01/29] *: check link via GitHub action --- .github/workflows/link-check.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/link-check.yaml diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml new file mode 100644 index 000000000..b0c7a9d8c --- /dev/null +++ b/.github/workflows/link-check.yaml @@ -0,0 +1,20 @@ +name: link-check + +on: [pull_request] + +jobs: + base: + runs-on: ubuntu-18.04 + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Link check for zh + uses: peter-evans/link-checker@v1 + with: + args: -d $GITHUB_WORKSPACE/zh -r -v * + + - name: Link check for en + uses: peter-evans/link-checker@v1 + with: + args: -d $GITHUB_WORKSPACE/en -r -v * From 520806b03c6d5e55e57ab6f47e08df2d609d3843 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 11:09:19 +0800 Subject: [PATCH 02/29] *: exclude to `media` --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index b0c7a9d8c..f537a0fb9 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,9 +12,9 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE/zh -r -v * + args: -d $GITHUB_WORKSPACE/zh -r -x /media/.* -v * - name: Link check for en uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE/en -r -v * + args: -d $GITHUB_WORKSPACE/en -r -x /media/.* -v * From 8e2dc46af605af14581c9dc2eea42026c8829c21 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 11:30:44 +0800 Subject: [PATCH 03/29] *: debug liche --- .github/workflows/link-check.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index f537a0fb9..8d8ad4ce4 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -9,12 +9,7 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Link check for zh + - name: Link check uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE/zh -r -x /media/.* -v * - - - name: Link check for en - uses: peter-evans/link-checker@v1 - with: - args: -d $GITHUB_WORKSPACE/en -r -x /media/.* -v * + args: -r -x /media/.* -v * From 7ceef22d3bd94d2ce3c3b4d98f32810864610010 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 11:32:55 +0800 Subject: [PATCH 04/29] *: debug liche --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 8d8ad4ce4..3fefc1a58 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,4 +12,4 @@ jobs: - name: Link check uses: peter-evans/link-checker@v1 with: - args: -r -x /media/.* -v * + args: -d $GITHUB_WORKSPACE -r -x /media/.* -v * From bde59d5158ff647438e5861cb2ce7ef7fa77de80 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 11:39:30 +0800 Subject: [PATCH 05/29] *: debug liche --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 3fefc1a58..6770cf3cb 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,4 +12,4 @@ jobs: - name: Link check uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE -r -x /media/.* -v * + args: -d ${{ env.GITHUB_WORKSPACE }} -r -x /media/.* -v * From 9f31ed35adf2d106797542eacde76c101bfa6887 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 11:58:34 +0800 Subject: [PATCH 06/29] *: debug liche --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 6770cf3cb..aa3e4d0ed 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,4 +12,4 @@ jobs: - name: Link check uses: peter-evans/link-checker@v1 with: - args: -d ${{ env.GITHUB_WORKSPACE }} -r -x /media/.* -v * + args: -d GITHUB_WORKSPACE -r -v * From 82a5d2fa0d8dfd151226951df279124f9bdc288d Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:07:13 +0800 Subject: [PATCH 07/29] *: update args for liche --- .github/workflows/link-check.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index aa3e4d0ed..27ed07940 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -9,7 +9,12 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Link check + - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d GITHUB_WORKSPACE -r -v * + args: -d GITHUB_WORKSPACE -r -v -x http://172.* zh* + + - name: Link check for eh + uses: peter-evans/link-checker@v1 + with: + args: -d GITHUB_WORKSPACE -r -v -x http://172.* en* From c4801f0162ecb885384a7a3f80192d2caee06be9 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:11:44 +0800 Subject: [PATCH 08/29] Fail if there were link errors --- .github/workflows/link-check.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 27ed07940..504b2a48a 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -15,6 +15,15 @@ jobs: args: -d GITHUB_WORKSPACE -r -v -x http://172.* zh* - name: Link check for eh + id: lc uses: peter-evans/link-checker@v1 with: args: -d GITHUB_WORKSPACE -r -v -x http://172.* en* + + - name: Fail if there were link errors + run: exit ${{ steps.lc.outputs.exit_code }} + + # Debug via SSH if previous steps failed + - name: Set up tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v2 From 4a6c2a10850b8223c678ff944efe855179af5513 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:14:13 +0800 Subject: [PATCH 09/29] *: fix env --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 504b2a48a..d3f608d83 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,13 +12,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d GITHUB_WORKSPACE -r -v -x http://172.* zh* + args: -d $GITHUB_WORKSPACE -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -d GITHUB_WORKSPACE -r -v -x http://172.* en* + args: -d $GITHUB_WORKSPACE -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 9c7d07006a25c7e236b5e9f0af98d5c24280ea52 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:19:17 +0800 Subject: [PATCH 10/29] *: try hardcode doc root --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index d3f608d83..c776c8780 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,13 +12,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE -r -v -x http://172.* zh* + args: -d /home/runner/work/docs-dm/docs-dm -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -d $GITHUB_WORKSPACE -r -v -x http://172.* en* + args: -d /home/runner/work/docs-dm/docs-dm -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 4f4b712fcc03ca55d3c6e66ad43d5e4f73cf5736 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:28:55 +0800 Subject: [PATCH 11/29] *: update doc root --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index c776c8780..aa7fcdbc4 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -12,13 +12,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d /home/runner/work/docs-dm/docs-dm -r -v -x http://172.* zh* + args: -d /github/workspace -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -d /home/runner/work/docs-dm/docs-dm -r -v -x http://172.* en* + args: -d /github/workspace -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From e31d5f07c138b432f98466a350693f084fe6997b Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:38:39 +0800 Subject: [PATCH 12/29] *: decrease concurrency to avoid "HTTP error 429" --- .github/workflows/link-check.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index aa7fcdbc4..a31833e26 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -9,21 +9,22 @@ jobs: - name: Check out code uses: actions/checkout@v2 + # NOTE: if `-c` is too large, `Too Many Requests (HTTP error 429)` may be reported. - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -d /github/workspace -r -v -x http://172.* zh* + args: -c 16 -d /github/workspace -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -d /github/workspace -r -v -x http://172.* en* + args: -c 16 -d /github/workspace -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} # Debug via SSH if previous steps failed - - name: Set up tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v2 + #- name: Set up tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v2 From 7e606e9734e6b8c1510f764caf059d2de62c6c6c Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:41:36 +0800 Subject: [PATCH 13/29] *: decrease concurrency again --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index a31833e26..bfedcb26e 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -13,13 +13,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 16 -d /github/workspace -r -v -x http://172.* zh* + args: -c 8 -d /github/workspace -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -c 16 -d /github/workspace -r -v -x http://172.* en* + args: -c 8 -d /github/workspace -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 5a6ba35091c0afbc4ff8ce1862571613e2ae7464 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 13:50:00 +0800 Subject: [PATCH 14/29] *: decrease concurrency to 4; add some notes --- .github/workflows/link-check.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index bfedcb26e..8b5fca33d 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -9,17 +9,21 @@ jobs: - name: Check out code uses: actions/checkout@v2 - # NOTE: if `-c` is too large, `Too Many Requests (HTTP error 429)` may be reported. + # NOTE: + # - the check process can be very fast, + # but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`. + # - we hardcode `--document-root` to `/github/workspace` in the container now. + # - we use `http://172.*` as sample addresses in some docs, so we need to exclude them. - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 8 -d /github/workspace -r -v -x http://172.* zh* + args: -c 4 -d /github/workspace -r -v -x http://172.* zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -c 8 -d /github/workspace -r -v -x http://172.* en* + args: -c 4 -d /github/workspace -r -v -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 090fc15be0c663314e029295ec810582b0c30725 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:04:32 +0800 Subject: [PATCH 15/29] *: exclude "https://github.com/pingcap/dm/pull/.*" --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 8b5fca33d..87c28d4d0 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 4 -d /github/workspace -r -v -x http://172.* zh* + args: -c 32 -d /github/workspace -r -v -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -c 4 -d /github/workspace -r -v -x http://172.* en* + args: -c 32 -d /github/workspace -r -v -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 6e5e6a17422e199967e265c3b37240476ff9db06 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:09:49 +0800 Subject: [PATCH 16/29] *: do not show OK --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 87c28d4d0..ab3f4635f 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -v -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' zh* + args: -c 32 -d /github/workspace -r -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -v -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' en* + args: -c 32 -d /github/workspace -r -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 680216399fb2c78eb77ee4fcfdd33f4f4a233376 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:17:18 +0800 Subject: [PATCH 17/29] *: try update reg --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index ab3f4635f..8ef61eb35 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' zh* + args: -c 32 -d /github/workspace -r -x 'http://172.*|https://github.com/pingcap/dm/pull/.*' zh* - name: Link check for eh id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x '(http://172.*|https://github.com/pingcap/dm/pull/.*)' en* + args: -c 32 -d /github/workspace -r -x 'http://172.*|https://github.com/pingcap/dm/pull/.*' en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 2390174af0cf75c87b6df941d4f5504c35119d19 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:18:59 +0800 Subject: [PATCH 18/29] *: debug reg --- .github/workflows/link-check.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 8ef61eb35..9c34ffb13 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x 'http://172.*|https://github.com/pingcap/dm/pull/.*' zh* + args: -c 32 -d /github/workspace -r -x http://172.* zh* - - name: Link check for eh + - name: Link check for en id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x 'http://172.*|https://github.com/pingcap/dm/pull/.*' en* + args: -c 32 -d /github/workspace -r -x http://172.* en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From e285726e6f5f47664d01de06031e213402320220 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:26:33 +0800 Subject: [PATCH 19/29] *: debug reg --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 9c34ffb13..0c6f781dd 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x http://172.* zh* + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*" zh* - name: Link check for en id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x http://172.* en* + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*" en* - name: Fail if there were link errors run: exit ${{ steps.lc.outputs.exit_code }} From 43bfd08daea134f1d4cd063953f8c98e82242d07 Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 14:44:27 +0800 Subject: [PATCH 20/29] *: add echo --- .github/workflows/link-check.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 0c6f781dd..02e7fc3c8 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -26,7 +26,10 @@ jobs: args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*" en* - name: Fail if there were link errors - run: exit ${{ steps.lc.outputs.exit_code }} + if: ${{ steps.lc.outputs.exit_code }} + run: | + echo "please check previous steps: \"Link check for zh\" and \"Link check for en\"" + exit ${{ steps.lc.outputs.exit_code }} # Debug via SSH if previous steps failed #- name: Set up tmate session From 01c1c68816881f6ff9e4cc8763d25ae20cdb34dc Mon Sep 17 00:00:00 2001 From: csuzhangxc Date: Mon, 7 Sep 2020 15:13:42 +0800 Subject: [PATCH 21/29] *: exlude .md files --- .github/workflows/link-check.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 02e7fc3c8..6c695f99b 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -17,13 +17,13 @@ jobs: - name: Link check for zh uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*" zh* + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh* - name: Link check for en id: lc uses: peter-evans/link-checker@v1 with: - args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*" en* + args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" en* - name: Fail if there were link errors if: ${{ steps.lc.outputs.exit_code }} From 2c902b09b9fcd995e3dec02d2d0d3e9a3ad4941a Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Mon, 7 Sep 2020 15:16:05 +0800 Subject: [PATCH 22/29] Update .github/workflows/link-check.yaml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 6c695f99b..1377b0300 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -1,4 +1,4 @@ -name: link-check +name: external-link-check on: [pull_request] From 780ec38391554fc171b0c0d4822a0192b4818486 Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Mon, 7 Sep 2020 15:16:13 +0800 Subject: [PATCH 23/29] Update .github/workflows/link-check.yaml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 1377b0300..f74030ee5 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -14,7 +14,7 @@ jobs: # but if `-c` is too large then `Too Many Requests (HTTP error 429)` may be reported from `https://github.com/*`. # - we hardcode `--document-root` to `/github/workspace` in the container now. # - we use `http://172.*` as sample addresses in some docs, so we need to exclude them. - - name: Link check for zh + - name: Check external links in zh files uses: peter-evans/link-checker@v1 with: args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh* From 6b2ead5d9d2404c2567675438b3eba2fc3895d96 Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Mon, 7 Sep 2020 15:16:21 +0800 Subject: [PATCH 24/29] Update .github/workflows/link-check.yaml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index f74030ee5..69a6044d5 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -19,7 +19,7 @@ jobs: with: args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" zh* - - name: Link check for en + - name: Check external links in en files id: lc uses: peter-evans/link-checker@v1 with: From c308e0e9d5f5e0a21c8911149d3a0060c0167687 Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Mon, 7 Sep 2020 15:16:30 +0800 Subject: [PATCH 25/29] Update .github/workflows/link-check.yaml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 69a6044d5..82db4a638 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -25,7 +25,7 @@ jobs: with: args: -c 32 -d /github/workspace -r -x "http://172.*|https://github.com/pingcap/dm/pull/.*|.*.md" en* - - name: Fail if there were link errors + - name: Fail if there were external link errors if: ${{ steps.lc.outputs.exit_code }} run: | echo "please check previous steps: \"Link check for zh\" and \"Link check for en\"" From 0e290e005ac3f3a20d7ea1e0521690eadfc28792 Mon Sep 17 00:00:00 2001 From: Xuecheng Zhang Date: Mon, 7 Sep 2020 15:16:41 +0800 Subject: [PATCH 26/29] Update .github/workflows/link-check.yaml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .github/workflows/link-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/link-check.yaml b/.github/workflows/link-check.yaml index 82db4a638..e56226a70 100644 --- a/.github/workflows/link-check.yaml +++ b/.github/workflows/link-check.yaml @@ -28,7 +28,7 @@ jobs: - name: Fail if there were external link errors if: ${{ steps.lc.outputs.exit_code }} run: | - echo "please check previous steps: \"Link check for zh\" and \"Link check for en\"" + echo "Please check the broken links reported in previous steps \"Check external links in zh files\" and \"Check external links in en files\"." exit ${{ steps.lc.outputs.exit_code }} # Debug via SSH if previous steps failed From 76281930feac3208761145b3e126e4959ea8b9d6 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 7 Sep 2020 15:26:22 +0800 Subject: [PATCH 27/29] fix an external link; update ci.yaml --- .github/workflows/ci.yaml | 4 ++-- en/maintain-dm-using-tiup.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 78c3edb6d..87dd03464 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,9 +17,9 @@ jobs: with: config: './.markdownlint.yaml' args: '.' - - name: Verify links + - name: Verify internal links run: ./hack/verify-links.sh - - name: Verify link anchors + - name: Verify internal link anchors run: ./hack/verify-link-anchors.sh - name: "Check unclosed tags" run: diff --git a/en/maintain-dm-using-tiup.md b/en/maintain-dm-using-tiup.md index 8500d6b43..e82894565 100644 --- a/en/maintain-dm-using-tiup.md +++ b/en/maintain-dm-using-tiup.md @@ -266,7 +266,7 @@ Execute `tiup list dm-master` to view the latest cluster version supported by Ti The process of using the `import` command is as follows: -1. TiUP generates a topology file [`topology.yml`](https://github.com/pingcap/tiup/blob/master/examples/topology.dm.example.yaml) based on the DM cluster previously deployed using DM-Ansible. +1. TiUP generates a topology file [`topology.yml`](https://github.com/pingcap/tiup/blob/master/examples/dm/topology.example.yaml) based on the DM cluster previously deployed using DM-Ansible. 2. After confirming that the topology file has been generated, you can use it to deploy the DM cluster of v2.0 or later versions. After the deployment is completed, you can execute the `tiup dm start` command to start the cluster and begin the process of upgrading the DM kernel. From 81661a9b2f10060f4015ebae8c7f7f457ec3ac8e Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 7 Sep 2020 15:28:27 +0800 Subject: [PATCH 28/29] test ci --- zh/shard-merge-best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/shard-merge-best-practices.md b/zh/shard-merge-best-practices.md index 30ef558f8..980c28acb 100644 --- a/zh/shard-merge-best-practices.md +++ b/zh/shard-merge-best-practices.md @@ -12,7 +12,7 @@ aliases: ['/docs-cn/tidb-data-migration/dev/shard-merge-best-practices/'] 在[分库分表合并迁移的实现原理部分](feature-shard-merge-pessimistic.md#实现原理),我们介绍了 sharding group 的概念,简单来说可以理解为需要合并到下游同一个表的所有上游表即组成一个 sharding group。 -当前的 sharding DDL 算法为了能协调在不同分表执行 DDL 对 schema 变更的影响,加入了一些[使用限制](feature-shard-merge-pessimistic.md#使用限制)。而当这些使用限制由于某些异常原因被打破时,我们需要[手动处理 Sharding DDL Lock](manually-handling-sharding-ddl-locks.md) 甚至是完整重做整个数据迁移任务。 +当前的 sharding DDL 算法为了能协调在不同分表执行 DDL 对 schema 变更的影响,加入了一些[使用限制](feature-shard-merge-pessimistic.md#使用制)。而当这些使用限制由于某些异常原因被打破时,我们需要[手动处理 Sharding DDL Lock](manually-handling-sharding-ddl-locks.md) 甚至是完整重做整个数据迁移任务。 因此,为了减小异常发生时对数据迁移的影响,我们推荐将每一个 sharding group 拆分成一个独立的数据迁移任务。**这样当异常发生时,可能只有少部分迁移任务需要进行手动处理,其他数据迁移任务可以不受影响。** From 97af4bc0ebf22a3505122683654ea16bf9ffbdb1 Mon Sep 17 00:00:00 2001 From: yikeke Date: Mon, 7 Sep 2020 15:30:18 +0800 Subject: [PATCH 29/29] Revert "test ci" This reverts commit 81661a9b2f10060f4015ebae8c7f7f457ec3ac8e. --- zh/shard-merge-best-practices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/shard-merge-best-practices.md b/zh/shard-merge-best-practices.md index 980c28acb..30ef558f8 100644 --- a/zh/shard-merge-best-practices.md +++ b/zh/shard-merge-best-practices.md @@ -12,7 +12,7 @@ aliases: ['/docs-cn/tidb-data-migration/dev/shard-merge-best-practices/'] 在[分库分表合并迁移的实现原理部分](feature-shard-merge-pessimistic.md#实现原理),我们介绍了 sharding group 的概念,简单来说可以理解为需要合并到下游同一个表的所有上游表即组成一个 sharding group。 -当前的 sharding DDL 算法为了能协调在不同分表执行 DDL 对 schema 变更的影响,加入了一些[使用限制](feature-shard-merge-pessimistic.md#使用制)。而当这些使用限制由于某些异常原因被打破时,我们需要[手动处理 Sharding DDL Lock](manually-handling-sharding-ddl-locks.md) 甚至是完整重做整个数据迁移任务。 +当前的 sharding DDL 算法为了能协调在不同分表执行 DDL 对 schema 变更的影响,加入了一些[使用限制](feature-shard-merge-pessimistic.md#使用限制)。而当这些使用限制由于某些异常原因被打破时,我们需要[手动处理 Sharding DDL Lock](manually-handling-sharding-ddl-locks.md) 甚至是完整重做整个数据迁移任务。 因此,为了减小异常发生时对数据迁移的影响,我们推荐将每一个 sharding group 拆分成一个独立的数据迁移任务。**这样当异常发生时,可能只有少部分迁移任务需要进行手动处理,其他数据迁移任务可以不受影响。**