Skip to content

[fix #430] pin gocov to v1.1.0 and remove duplicate install step in CDC CI#431

Merged
pingyu merged 13 commits intomainfrom
copilot/add-unit-test-step
Mar 9, 2026
Merged

[fix #430] pin gocov to v1.1.0 and remove duplicate install step in CDC CI#431
pingyu merged 13 commits intomainfrom
copilot/add-unit-test-step

Conversation

Copy link
Contributor

Copilot AI commented Mar 5, 2026

cdc-unit-test CI job was failing because gocov@latest introduced a breaking change. The explicit install step in the workflow was also a duplicate of what the Makefile already handles.

What problem does this PR solve?

Problem Description: cdc/tools/Makefile installed gocov@latest, causing non-reproducible builds and CI failures. The CI workflow also had a redundant explicit install step.

What is changed and how does it work?

  • cdc/tools/Makefile: pin gocov from @latest@v1.1.0
  • .github/workflows/ci-cdc.yml: remove the standalone "install gocov" step — make unit_test_in_verify_ci already invokes the Makefile's gocov target which now installs the pinned version

Code changes

  • No code

Check List for Tests

This PR has been tested by at least one of the following methods:

  • No code

Side effects

  • No side effects

Related changes

  • No related changes

To reviewers

Please follow these principles to check this pull requests:

  • Concentration. One pull request should only do one thing. No matter how small it is, the change does exactly one thing and gets it right. Don't mix other changes into it.
  • Tests. A pull request should be test covered, whether the tests are unit tests, integration tests, or end-to-end tests. Tests should be sufficient, correct and don't slow down the CI pipeline largely.
  • Functionality. The pull request should implement what the author intends to do and fit well in the existing code base, resolve a real problem for TiDB/TiKV users. To get the author's intention and the pull request design, you could follow the discussions in the corresponding GitHub issue or internal.tidb.io topic.
  • Style. Code in the pull request should follow common programming style. (For Go, we have style checkers in CI). However, sometimes the existing code is inconsistent with the style guide, you should maintain consistency with the existing code or file a new issue to fix the existing code style first.
  • Documentation. If a pull request changes how users build, test, interact with, or release code, you must check whether it also updates the related documentation such as READMEs and any generated reference docs. Similarly, if a pull request deletes or deprecates code, you must check whether or not the corresponding documentation should also be deleted.
  • Performance. If you find the pull request may affect performance, you could ask the author to provide a benchmark result.

(The above text mainly refers to TiDB Development Guide. It's also highly recommended to read about Writing code review comments)

Original prompt

This section details on the original issue you should resolve

<issue_title>add unit test step in cdc ci workflow</issue_title>
<issue_description>the unit test command is make unit_test_in_verify_ci, also upload the coverage data to codecov.io after. the codecov token var name should be set as TIKV_MIGRATION_CODECOV_TOKEN.</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 5, 2026

Hi @Copilot. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copilot AI changed the title [WIP] Add unit test step in CDC CI workflow [close #issue_number] Add unit test step to CDC CI workflow Mar 5, 2026
@ti-chi-bot ti-chi-bot marked this pull request as ready for review March 6, 2026 07:10
@ti-chi-bot ti-chi-bot changed the title [close #issue_number] Add unit test step to CDC CI workflow [close #430] Add unit test step to CDC CI workflow Mar 6, 2026
@ti-chi-bot
Copy link
Member

@copilot please fix the ci failure include the "dco", please re-commit all your commit with signoff

@ti-chi-bot
Copy link
Member

/test ?

@wuhuizuo
Copy link
Collaborator

wuhuizuo commented Mar 6, 2026

/test pull-integration-test

@wuhuizuo
Copy link
Collaborator

wuhuizuo commented Mar 6, 2026

/test pull-unit-test

@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 6, 2026

@wuhuizuo: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test pull-integration-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wuhuizuo
Copy link
Collaborator

wuhuizuo commented Mar 6, 2026

/run-all-tests

@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 6, 2026

@wuhuizuo: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/test pull-unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Contributor Author

Copilot AI commented Mar 6, 2026

@copilot please fix the ci failure include the "dco", please re-commit all your commit with signoff

All new commits now include the Signed-off-by trailer (see commits 2778e80 and c49ec80). The two earlier unsigned commits (3c3b4b9, 3cbe125) remain in the branch history but cannot be amended without a force push. If the DCO check still fails due to those older commits, the PR could be squash-merged to resolve it.

Copy link
Contributor Author

Copilot AI commented Mar 6, 2026

@copilot install gocov with v1.1.0

Updated gocov to v1.1.0 in commit eca099c, signed off.

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>
@wuhuizuo
Copy link
Collaborator

wuhuizuo commented Mar 6, 2026

@copilot looks like we can remove the install gocov tool action step to avoid duplicate

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>
Copilot AI changed the title [close #430] Add unit test step to CDC CI workflow fix: pin gocov to v1.1.0 and remove duplicate install step in CDC CI Mar 6, 2026
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.1610%. Comparing base (d6003dc) to head (bd578b6).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##               main       #431        +/-   ##
================================================
+ Coverage   62.0761%   62.1610%   +0.0848%     
================================================
  Files           247        247                
  Lines         21174      21203        +29     
================================================
+ Hits          13144      13180        +36     
+ Misses         6820       6816         -4     
+ Partials       1210       1207         -3     
Flag Coverage Δ *Carryforward flag
br 60.5927% <ø> (ø) Carriedforward from 73c8606
cdc 62.8355% <ø> (+0.1201%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ti-chi-bot ti-chi-bot bot added size/L and removed size/S labels Mar 6, 2026
@wuhuizuo wuhuizuo force-pushed the copilot/add-unit-test-step branch from a17dbea to 760a7d5 Compare March 6, 2026 08:56
ti-chi-bot and others added 2 commits March 6, 2026 16:57
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@wuhuizuo wuhuizuo force-pushed the copilot/add-unit-test-step branch from 760a7d5 to 7deeebc Compare March 6, 2026 08:57
wuhuizuo added 4 commits March 6, 2026 17:14
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
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 <wuhuizuo@126.com>
@wuhuizuo wuhuizuo force-pushed the copilot/add-unit-test-step branch from 53d612a to bd578b6 Compare March 6, 2026 09:14
@wuhuizuo wuhuizuo changed the title fix: pin gocov to v1.1.0 and remove duplicate install step in CDC CI [fix #430] pin gocov to v1.1.0 and remove duplicate install step in CDC CI Mar 6, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 6, 2026

@Copilot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-test bd578b6 link true /test pull-integration-test
pull-unit-test bd578b6 link true /test pull-unit-test

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Collaborator

@pingyu pingyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@pingyu pingyu merged commit a1a3f88 into main Mar 9, 2026
9 of 11 checks passed
@pingyu pingyu deleted the copilot/add-unit-test-step branch March 9, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add unit test step in cdc ci workflow

4 participants