Skip to content

Add Ci workflow to compute code coverage#1674

Open
nezdolik wants to merge 1 commit into
cilium:mainfrom
nezdolik:ci-check-coverage
Open

Add Ci workflow to compute code coverage#1674
nezdolik wants to merge 1 commit into
cilium:mainfrom
nezdolik:ci-check-coverage

Conversation

@nezdolik

@nezdolik nezdolik commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Workflow computes code coverage for cilium-proxy source files using custom report generator. It relies heavily on bazel remote caching stored in gcs bucket and all reports (per PR) are uploaded to another gcs bucket and stored for 7 days.
Sample report: https://storage.googleapis.com/cilium-proxy-coverage-reports/c08c59a/coverage/html/index.html

@nezdolik nezdolik requested a review from a team as a code owner December 3, 2025 15:43
@nezdolik nezdolik requested a review from jrajahalme December 3, 2025 15:43
@nezdolik

nezdolik commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

looks like secret is not propagated to my fork workflow, synced offline with @sayboras on how to fix it

@jrajahalme jrajahalme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is some back-and-forth between adding/commenting/updating the GH workflow, could you clean up the PR by squashing all or most of that?

@sayboras

sayboras commented Dec 3, 2025

Copy link
Copy Markdown
Member

looks like secret is not propagated to my fork workflow

I think with the pull request target setup, the secrets will not be visible in forked repo. Once you clean up the commit, I can create another temp branch to test it out.

@nezdolik

nezdolik commented Dec 9, 2025

Copy link
Copy Markdown
Contributor Author

From offline discussion with @jrajahalme this feedback needs to be addressed:

Not sure I understand how this works, but I would expect that building test deps (//tests/...) before running the coverage build would not count the coverage on the pre-build test code, or will it be built again due to different compiler flags?

@nezdolik

Copy link
Copy Markdown
Contributor Author

@sayboras are you able to create a test branch for this PR?

@sayboras

Copy link
Copy Markdown
Member

are you able to create a test branch for this PR?

Sure, however, check format seems failing.

@nezdolik

Copy link
Copy Markdown
Contributor Author

are you able to create a test branch for this PR?

Sure, however, check format seems failing.

let me fix it

@nezdolik

Copy link
Copy Markdown
Contributor Author

@sayboras format is fixed

Comment thread envoy.bazelrc Outdated
build:coverage --define=dynamic_link_tests=false
# Use custom report generator that also generates HTML
build:coverage --coverage_report_generator=@envoy//tools/coverage:report_generator
build:coverage --coverage_report_generator=//tools/coverage:cilium_report_generator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh, this should be part of cilium/proxy .bazelrc file

Signed-off-by: Kateryna Nezdolii <kateryna.nezdolii@gmail.com>
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.

3 participants