From 501e2973e7a3cbde0830b0e49d8e3c9abf26c804 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 6 Mar 2026 07:37:14 +0000 Subject: [PATCH 01/13] ci: add job `cdc-unit-test` Signed-off-by: Ti Chi Robot --- .github/workflows/ci-cdc.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 6c34d07f..854da604 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '${{ env.GO_VERSION }}' + go-version: "${{ env.GO_VERSION }}" - name: make check shell: bash run: | @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '${{ env.GO_VERSION }}' + go-version: "${{ env.GO_VERSION }}" - name: make check-gosec shell: bash run: | @@ -44,9 +44,23 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-go@v2 with: - go-version: '${{ env.GO_VERSION }}' + go-version: "${{ env.GO_VERSION }}" - name: make cdc shell: bash run: | cd cdc/ make cdc + cdc-unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: "${{ env.GO_VERSION }}" + - name: make unit_test_in_verify_ci + shell: bash + env: + TIKV_MIGRATION_CODECOV_TOKEN: ${{ secrets.TIKV_MIGRATION_CODECOV_TOKEN }} + run: | + cd cdc/ + make unit_test_in_verify_ci From 7e3d448c7adb5c5a3290b0f8ede11b175638c752 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 6 Mar 2026 07:42:21 +0000 Subject: [PATCH 02/13] ci: try to trigger cdc ci workflow Signed-off-by: Ti Chi Robot --- .github/workflows/ci-cdc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 854da604..c769d933 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -5,7 +5,7 @@ on: paths: cdc/** pull_request: branches: main - paths: cdc/** + # paths: cdc/** permissions: contents: read From c878ae9f4134161d5c8525d744ac846569d5d086 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 6 Mar 2026 07:49:55 +0000 Subject: [PATCH 03/13] github: install gocov in cdc unit test workflow Signed-off-by: Ti Chi Robot --- .github/workflows/ci-cdc.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index c769d933..d734621f 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -57,6 +57,10 @@ jobs: - uses: actions/setup-go@v2 with: go-version: "${{ env.GO_VERSION }}" + - name: install gocov + shell: bash + run: | + go install github.com/axw/gocov/gocov@latest - name: make unit_test_in_verify_ci shell: bash env: From 88a743e3264fa57387c13bdfbdc48fa16302d901 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 6 Mar 2026 07:54:33 +0000 Subject: [PATCH 04/13] fix: specify gocov version to v1.2.0 in CI workflow Signed-off-by: Ti Chi Robot --- .github/workflows/ci-cdc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index d734621f..a1787565 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -60,7 +60,7 @@ jobs: - name: install gocov shell: bash run: | - go install github.com/axw/gocov/gocov@latest + go install github.com/axw/gocov/gocov@v1.2.0 - name: make unit_test_in_verify_ci shell: bash env: From eca099c5ea6ff3783489d72f64198b9eb7b3f9f7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 07:59:47 +0000 Subject: [PATCH 05/13] fix: use gocov v1.1.0 in CI workflow Signed-off-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ti-chi-bot <71242396+ti-chi-bot@users.noreply.github.com> --- .github/workflows/ci-cdc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index a1787565..4f824399 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -60,7 +60,7 @@ jobs: - name: install gocov shell: bash run: | - go install github.com/axw/gocov/gocov@v1.2.0 + go install github.com/axw/gocov/gocov@v1.1.0 - name: make unit_test_in_verify_ci shell: bash env: From 634ca397b9c7b1a91fe5d8d0ca50d94976da5f5f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 08:03:30 +0000 Subject: [PATCH 06/13] fix: pin gocov to v1.1.0 in tools/Makefile Signed-off-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ti-chi-bot <71242396+ti-chi-bot@users.noreply.github.com> --- cdc/tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdc/tools/Makefile b/cdc/tools/Makefile index 39364d64..16f18c3c 100644 --- a/cdc/tools/Makefile +++ b/cdc/tools/Makefile @@ -34,7 +34,7 @@ tools/bin/oapi-codegen: tools/check/go.mod cd tools/check && $(GO) build -mod=mod -o ../bin/oapi-codegen github.com/deepmap/oapi-codegen/cmd/oapi-codegen gocov: - $(GO) install github.com/axw/gocov/gocov@latest + $(GO) install github.com/axw/gocov/gocov@v1.1.0 gocov-xml: $(GO) install github.com/AlekSi/gocov-xml@latest From 73c8606d334cb08bd6fef273e4e13ba43780a23b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 08:11:35 +0000 Subject: [PATCH 07/13] fix: remove duplicate install gocov step from ci-cdc.yml workflow The gocov tool is already installed by the Makefile's `gocov` target (pinned to v1.1.0), which is called as part of `unit_test_in_verify_ci`. The explicit workflow step was redundant. Signed-off-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ti-chi-bot <71242396+ti-chi-bot@users.noreply.github.com> --- .github/workflows/ci-cdc.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 4f824399..c769d933 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -57,10 +57,6 @@ jobs: - uses: actions/setup-go@v2 with: go-version: "${{ env.GO_VERSION }}" - - name: install gocov - shell: bash - run: | - go install github.com/axw/gocov/gocov@v1.1.0 - name: make unit_test_in_verify_ci shell: bash env: From 6eb4e43c81e635fc00de51ed999fcb5f18ed5b94 Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 6 Mar 2026 16:23:19 +0800 Subject: [PATCH 08/13] Apply suggestion from @ti-chi-bot Signed-off-by: wuhuizuo --- .github/workflows/ci-cdc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index c769d933..854da604 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -5,7 +5,7 @@ on: paths: cdc/** pull_request: branches: main - # paths: cdc/** + paths: cdc/** permissions: contents: read From 7deeebc795660740fa8c198b25d3bef92d87cf3e Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 6 Mar 2026 16:56:24 +0800 Subject: [PATCH 09/13] ci: remove bulk load github workflows Signed-off-by: wuhuizuo --- .github/workflows/build.yml | 53 ------------------------------------ .github/workflows/test.yml | 54 ------------------------------------- 2 files changed, 107 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index d5524339..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright 2021 TiKV Project Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Build Bulk Load - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - - name: Checkout client-java - uses: actions/checkout@v2 - with: - repository: tikv/client-java - path: client-java - - - name: Build Client Java - run: mvn --file client-java/pom.xml clean install -DskipTests - - - name: Build Online Bulk Load - run: mvn clean package -DskipTests - - - run: git diff HEAD - - - name: Check code format - run: git diff --quiet HEAD - diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index d8a17408..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2021 TiKV Project Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Test Bulk Load - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Install TiUP - run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh - - - name: Deploy TiKV Cluster - run: /home/runner/.tiup/bin/tiup install playground:v1.5.0; /home/runner/.tiup/bin/tiup playground nightly --mode tikv-slim --kv 3 --monitor=false & - - - name: Set up JDK 8 - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'adopt' - cache: maven - - - name: Checkout client-java - uses: actions/checkout@v2 - with: - repository: tikv/client-java - path: client-java - - - name: Build Client Java - run: mvn --file client-java/pom.xml clean install -DskipTests - - - name: Test Online Bulk Load - run: mvn test - From 9b5e916b714d054e86b70525a2a9861935d7257d Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 6 Mar 2026 17:04:29 +0800 Subject: [PATCH 10/13] ci: optimize cdc workflow runtime and maintenance Signed-off-by: wuhuizuo --- .github/workflows/ci-cdc.yml | 68 +++++++++++++++++++++--------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 854da604..1fc4e598 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -1,66 +1,78 @@ name: TiKV-CDC + on: push: - branches: main - paths: cdc/** + branches: + - main + paths: + - "cdc/**" + - ".github/workflows/ci-cdc.yml" pull_request: - branches: main - paths: cdc/** + branches: + - main + paths: + - "cdc/**" + - ".github/workflows/ci-cdc.yml" permissions: contents: read +concurrency: + group: ci-cdc-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: GO_VERSION: 1.21.4 +defaults: + run: + shell: bash + working-directory: cdc + jobs: cdc-lint: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "${{ env.GO_VERSION }}" + cache-dependency-path: cdc/go.sum - name: make check - shell: bash - run: | - cd cdc/ - make check + run: make check cdc-check-gosec: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "${{ env.GO_VERSION }}" + cache-dependency-path: cdc/go.sum - name: make check-gosec - shell: bash - run: | - cd cdc/ - make check-gosec + run: make check-gosec cdc-build: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "${{ env.GO_VERSION }}" + cache-dependency-path: cdc/go.sum - name: make cdc - shell: bash - run: | - cd cdc/ - make cdc + run: make cdc cdc-unit-test: runs-on: ubuntu-latest + timeout-minutes: 20 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: "${{ env.GO_VERSION }}" + cache-dependency-path: cdc/go.sum - name: make unit_test_in_verify_ci - shell: bash env: TIKV_MIGRATION_CODECOV_TOKEN: ${{ secrets.TIKV_MIGRATION_CODECOV_TOKEN }} - run: | - cd cdc/ - make unit_test_in_verify_ci + run: make unit_test_in_verify_ci From d6cce0017e9dd18ed11721e8d2c2fc3a369dc807 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 6 Mar 2026 17:06:27 +0800 Subject: [PATCH 11/13] ci: read cdc go version from go.mod Signed-off-by: wuhuizuo --- .github/workflows/ci-cdc.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 1fc4e598..1f5ab18a 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -21,9 +21,6 @@ concurrency: group: ci-cdc-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - GO_VERSION: 1.21.4 - defaults: run: shell: bash @@ -37,7 +34,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "${{ env.GO_VERSION }}" + go-version-file: cdc/go.mod cache-dependency-path: cdc/go.sum - name: make check run: make check @@ -48,7 +45,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "${{ env.GO_VERSION }}" + go-version-file: cdc/go.mod cache-dependency-path: cdc/go.sum - name: make check-gosec run: make check-gosec @@ -59,7 +56,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "${{ env.GO_VERSION }}" + go-version-file: cdc/go.mod cache-dependency-path: cdc/go.sum - name: make cdc run: make cdc @@ -70,7 +67,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: "${{ env.GO_VERSION }}" + go-version-file: cdc/go.mod cache-dependency-path: cdc/go.sum - name: make unit_test_in_verify_ci env: From 4435e869d9aa22c71a7814602a6357455edeaeff Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 6 Mar 2026 17:09:19 +0800 Subject: [PATCH 12/13] ci: merge cdc jobs to reduce duplicated setup Signed-off-by: wuhuizuo --- .github/workflows/ci-cdc.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 1f5ab18a..669048c9 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -27,48 +27,34 @@ defaults: working-directory: cdc jobs: - cdc-lint: + cdc-check: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 30 steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: cdc/go.mod - cache-dependency-path: cdc/go.sum + cache-dependency-path: | + cdc/go.sum + cdc/tools/check/go.sum - name: make check run: make check - cdc-check-gosec: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: cdc/go.mod - cache-dependency-path: cdc/go.sum - name: make check-gosec run: make check-gosec - cdc-build: + cdc-build-and-unit-test: runs-on: ubuntu-latest - timeout-minutes: 20 + timeout-minutes: 40 steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: cdc/go.mod - cache-dependency-path: cdc/go.sum + cache-dependency-path: | + cdc/go.sum + cdc/tools/check/go.sum - name: make cdc run: make cdc - cdc-unit-test: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: cdc/go.mod - cache-dependency-path: cdc/go.sum - name: make unit_test_in_verify_ci env: TIKV_MIGRATION_CODECOV_TOKEN: ${{ secrets.TIKV_MIGRATION_CODECOV_TOKEN }} From bd578b698af3596b9cd9bf9f44dcc422871a50ab Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Fri, 6 Mar 2026 17:14:11 +0800 Subject: [PATCH 13/13] ci: rename CI job and consolidate build steps The `cdc-check` job is renamed to `verify` and now includes the `cdc-build-and-unit-test` steps. This simplifies the workflow by removing a separate job. Signed-off-by: wuhuizuo --- .github/workflows/ci-cdc.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/ci-cdc.yml b/.github/workflows/ci-cdc.yml index 669048c9..5bc458c6 100644 --- a/.github/workflows/ci-cdc.yml +++ b/.github/workflows/ci-cdc.yml @@ -27,7 +27,7 @@ defaults: working-directory: cdc jobs: - cdc-check: + verify-cdc: runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -42,17 +42,6 @@ jobs: run: make check - name: make check-gosec run: make check-gosec - cdc-build-and-unit-test: - runs-on: ubuntu-latest - timeout-minutes: 40 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: cdc/go.mod - cache-dependency-path: | - cdc/go.sum - cdc/tools/check/go.sum - name: make cdc run: make cdc - name: make unit_test_in_verify_ci