Skip to content

[#18194] Include all per-module JaCoCo execution data in jacocoTestReport - #39819

Open
ulofiai wants to merge 1 commit into
apache:masterfrom
ulofiai:fix/issue-18194
Open

[#18194] Include all per-module JaCoCo execution data in jacocoTestReport#39819
ulofiai wants to merge 1 commit into
apache:masterfrom
ulofiai:fix/issue-18194

Conversation

@ulofiai

@ulofiai ulofiai commented Aug 19, 2026

Copy link
Copy Markdown

Fixes #18194.

The shared jacocoTestReport configuration in BeamModulePlugin hard-codes its execution data to build/jacoco/test.exec. Any other Test task that runs in a module writes its JaCoCo execution data to build/jacoco/<taskName>.exec (Gradle default), and that data was silently excluded from the report. In particular, runners/direct-java's needsRunnerTests and validatesRunner tasks execute the sdks/java/core NeedsRunner/ValidatesRunner suites, and none of that coverage was counted — the under-reporting described in the issue (the bulk of the SDK is tested via the DirectRunner).

This change sets the report's execution data to a fileTree over build/jacoco/*.exec, so execution data from every Test task that actually ran in the module is aggregated. A fileTree is also more robust than a hard-coded file reference when a given exec file does not exist (the report task is skipped as NO-SOURCE instead of failing). Report class directories, source directories, excludes, and the CI upload path (**/build/jacoco/report/**) are unchanged.

The shared jacocoTestReport configuration hard-coded its execution data
to build/jacoco/test.exec, so coverage recorded by other Test tasks in
the same module (e.g. needsRunnerTests and validatesRunner in
runners/direct-java, which run the sdks/java/core runner-based suites)
was silently dropped, under-reporting coverage.

Use a fileTree over build/jacoco/*.exec so execution data from every
Test task that ran in the module is included in the report.

Fixes apache#18194

Signed-off-by: ulofiai <monsterking@tutamail.com>
@github-actions github-actions Bot added the build label Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@ulofiai

ulofiai commented Aug 20, 2026

Copy link
Copy Markdown
Author

assign set of reviewers

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label build.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

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.

Code coverage numbers are not accurate

1 participant