Skip to content

bazel: Backport the coverage merger and llvm-cov wrapper to WORKSPACE - #5588

Merged
phlax merged 1 commit into
envoyproxy:workspacefrom
phlax:workspace-coverage
Nov 13, 2026
Merged

phlax merged 1 commit into
envoyproxy:workspacefrom
phlax:workspace-coverage

Conversation

@phlax

@phlax phlax commented Nov 13, 2026

Copy link
Copy Markdown
Member

Port //coverage:lcov_merger and //coverage:llvm_support (the llvm-cov wrapper), with their tests, from main at bazel-v0.5.20 (#5580, #5582), so WORKSPACE consumers can postprocess coverage inside the test action as main does.

With split postprocessing, each test uploads its raw profile for a separate action to download again. For Envoy that is about 140MB per integration test. Inside the test action, the wrapper exports line coverage for workspace sources only, and the merger strips the records the report does not read and removes the coverage directory's intermediates before the test's outputs are uploaded.

The files are unchanged from main. The report generation that came with them on main (run, coverage_report, the grcov and lcov merge repositories) is left out: WORKSPACE consumers have their own.

Tested with Envoy's release/v1.39 on envoy-ci-staging (envoyproxy/envoy-ci-staging#2163), pinned to this commit with --noexperimental_split_coverage_postprocessing, --coverage_support=@envoy_toolshed//coverage:llvm_support, --coverage_output_generator=@envoy_toolshed//coverage:lcov_merger and LLVM_COV=external/envoy_toolshed/coverage/llvm/llvm-cov.sh:

  • test action uploads fall from 60-81MB to 0.4MB per test, about 130GB less per full coverage run
  • all 1450 tests pass and overall coverage is unchanged (96.7%)

@phlax
phlax requested a balanced review from Copilot November 13, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Port `//coverage:lcov_merger` and `//coverage:llvm_support` (the
`llvm-cov` wrapper), with their tests, from `main` at bazel-v0.5.20, so
that WORKSPACE consumers can postprocess coverage inside the test action
as `main` does (envoyproxy#5580, envoyproxy#5582).

With split postprocessing, each test uploads its raw profile for a
separate action to download again. For Envoy that is about 140MB per
integration test and 130GB per full coverage run. Inside the test
action, the wrapper exports line coverage for workspace sources only,
and the merger strips the records the report does not read and removes
the coverage directory's intermediates before the test's outputs are
uploaded.

The files are unchanged from `main`. The report generation that came
with them on `main` (`run`, `coverage_report`, the grcov and lcov merge
repositories) is left out: WORKSPACE consumers have their own.

Signed-off-by: Ryan Northey <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The merger’s cleanup can delete a nested coverage report and then exit successfully, silently losing coverage.

No open issues 🎉

Review effort: Balanced

@phlax
phlax merged commit 4b2e295 into envoyproxy:workspace Nov 13, 2026
29 checks passed
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
For the coverage merger and llvm-cov wrapper backported to the WORKSPACE line (envoyproxy/toolshed#5588), used by the following change to postprocess coverage inside the test action.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
0.4.13.post2 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
0.4.13.post2 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action.

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 13, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 16, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 17, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to envoyproxy/envoy that referenced this pull request Nov 17, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
phlax added a commit to phlax/envoy that referenced this pull request Nov 18, 2026
0.4.13.post3 has the coverage merger and llvm-cov wrapper backported to
the WORKSPACE line (envoyproxy/toolshed#5588), used to postprocess
coverage inside the test action, and its merge for Bazel 7, which does
not stage Bazel's own merger in the test action (envoyproxy/toolshed#5591).

Signed-off-by: Ryan Northey <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants