*: switch bazel coverage test targets to bazel test#67982
*: switch bazel coverage test targets to bazel test#67982hawkingrei wants to merge 1 commit intopingcap:masterfrom
Conversation
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Makefile`:
- Around line 718-725: CI currently expects the old coverage artifact produced
by the bazel_coverage_test* targets, but the changed bazel test invocation in
target bazel_coverage_test_ddlargsv1 no longer emits that report; update either
the two CI scripts (jenkins_unit_test.sh and jenkins_unit_test_ddlargsv1.sh) to
detect the new behavior and consume whatever coverage output Bazel now produces
(or gracefully handle missing coverage), or restore a separate
coverage-producing Bazel target (e.g., reintroduce a bazel_coverage_test target
variant that generates the legacy coverage report) and wire that target back
into the CI callers so the expected artifact is present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| bazel $(BAZEL_GLOBAL_CONFIG) --nohome_rc test $(BAZEL_CMD_CONFIG) $(BAZEL_INSTRUMENTATION_FILTER) --jobs=HOST_CPUS*0.9 --build_tests_only --test_keep_going=false \ | ||
| --define gotags=$(UNIT_TEST_TAGS) \ | ||
| -- //... -//cmd/... -//tests/graceshutdown/... \ | ||
| -//tests/globalkilltest/... -//tests/readonlytest/... -//tests/realtikvtest/... | ||
|
|
||
| .PHONY: bazel_coverage_test_ddlargsv1 | ||
| bazel_coverage_test_ddlargsv1: bazel-failpoint-enable bazel_ci_simple_prepare | ||
| bazel $(BAZEL_GLOBAL_CONFIG) --nohome_rc coverage $(BAZEL_CMD_CONFIG) $(BAZEL_INSTRUMENTATION_FILTER) --jobs=HOST_CPUS*0.9 --build_tests_only --test_keep_going=false \ | ||
| --combined_report=lcov \ | ||
| bazel $(BAZEL_GLOBAL_CONFIG) --nohome_rc test $(BAZEL_CMD_CONFIG) $(BAZEL_INSTRUMENTATION_FILTER) --jobs=HOST_CPUS*0.9 --build_tests_only --test_keep_going=false \ |
There was a problem hiding this comment.
Update the Jenkins coverage collectors with this behavior change.
build/jenkins_unit_test.sh and build/jenkins_unit_test_ddlargsv1.sh still call these bazel_coverage_test* targets and look for ./bazel-out/_coverage/_coverage_report.dat. With bazel test, that report will no longer be produced, so CI will fall back to an empty coverage.dat and may silently drop coverage data. Please update those scripts/artifact expectations in the same PR if losing coverage is intentional, or keep a separate coverage-producing target for coverage jobs.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Makefile` around lines 718 - 725, CI currently expects the old coverage
artifact produced by the bazel_coverage_test* targets, but the changed bazel
test invocation in target bazel_coverage_test_ddlargsv1 no longer emits that
report; update either the two CI scripts (jenkins_unit_test.sh and
jenkins_unit_test_ddlargsv1.sh) to detect the new behavior and consume whatever
coverage output Bazel now produces (or gracefully handle missing coverage), or
restore a separate coverage-producing Bazel target (e.g., reintroduce a
bazel_coverage_test target variant that generates the legacy coverage report)
and wire that target back into the CI callers so the expected artifact is
present.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67982 +/- ##
================================================
- Coverage 77.7953% 77.1182% -0.6772%
================================================
Files 1984 1966 -18
Lines 549728 551723 +1995
================================================
- Hits 427663 425479 -2184
- Misses 121145 126105 +4960
+ Partials 920 139 -781
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Merge before leaving work /hold |
| bazel_coverage_test: bazel-failpoint-enable bazel_ci_simple_prepare | ||
| bazel $(BAZEL_GLOBAL_CONFIG) --nohome_rc coverage $(BAZEL_CMD_CONFIG) $(BAZEL_INSTRUMENTATION_FILTER) --jobs=HOST_CPUS*0.9 --build_tests_only --test_keep_going=false \ | ||
| --combined_report=lcov \ | ||
| bazel $(BAZEL_GLOBAL_CONFIG) --nohome_rc test $(BAZEL_CMD_CONFIG) $(BAZEL_INSTRUMENTATION_FILTER) --jobs=HOST_CPUS*0.9 --build_tests_only --test_keep_going=false \ |
There was a problem hiding this comment.
maybe rename the target too
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: D3Hunter, Defined2014 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
What problem does this PR solve?
Issue Number: ref #67956
Problem Summary:
bazel_coverage_testandbazel_coverage_test_ddlargsv1still invokebazel coverage, which keeps the target behavior tied to coverage report generation even when the caller only needs a normal Bazel test run.What changed and how does it work?
bazel coveragetobazel test--combined_report=lcovfrom both targetsCheck List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
Release Notes