Visitar URL original
Reduce Gradle build and test log spam in Java CI workflows by Abacn · Pull Request #40458 · apache/beam · GitHub
Skip to content

Reduce Gradle build and test log spam in Java CI workflows - #40458

Merged
Abacn merged 2 commits into
apache:masterfrom
Abacn:logspam
Oct 8, 2026
Merged

Abacn merged 2 commits into
apache:masterfrom
Abacn:logspam

Conversation

@Abacn

@Abacn Abacn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor
  • Remove 'passed' from default testLogging events in BeamModulePlugin so only skipped/failed tests and per-task summaries are logged.

  • Downgrade the CI Maven Central mirror log message from lifecycle to debug in Repositories.groovy and settings.gradle.kts to avoid repeating it for every subproject.

  • Remove showStandardStreams = true and outputs.upToDateWhen {false} overrides from needsRunnerTests and examplesIntegrationTest in :runners:direct-java, :sdks:java:io:debezium. If workflow failes, these logs are available from junit-test-result.zip downloading from workflow run summary page

After GHA workflow changed pull_request_target -> pull_request trigger, failed tests on PR run no longer publish status, and one needs to either dig into test log or download junit-test-report. Test log currently has a few spammy logs:

Rank Category Line Count % of Total Log Primary Cause
1 Gradle Per-Test PASSED / SKIPPED Events & Trailing Blank Lines 19,506 51.65% testLogging { events 'passed', 'skipped', 'failed' } in BeamModulePlugin.groovy
2 :runners:direct-java:needsRunnerTests Standard Error (SLF4J INFO/WARN) 6,472 17.14% showStandardStreams = true in runners/direct-java/build.gradle + noisy INFO/WARN loggers in SDK Core
3 JMH Benchmark Execution (:sdks:java:harness:jmh:jmhTest & :core:jmh:jmhTest) 4,440 11.76% System.out.println in ExecutionStateSamplerBenchmark, JMH runner banners, and unclosed gRPC channels
4 Gradle Task Execution Headers (> Task :...) & Blank Separators ~2,500 6.62% 2,249 Gradle task headers (1,612 executed, 316 skipped, 242 no-source, etc.)
5 SpotBugs Missing Class Warnings (:sdks:java:extensions:avro:spotbugsAvro*) 1,174 3.11% spotbugsAvro182/192/1102/1113 running with ignoreFailures = true and missing auxiliary classpath
6 Compiler (javac) & Javadoc Warnings ~380 1.01% Deprecation/unchecked notes and invalid < HTML in Javadoc comments
7 Gradle Project Configuration & Maven Mirror Lifecycle Logs 328 0.87% logger.lifecycle("Running in CI. Mirroring Maven Central...") logged per subproject (110 times)
8 Flink Test Shutdown Hook & Finalizer INFO Logs 296 0.78% slf4j-simple used instead of log4j in flink_runner.gradle, logging at INFO during JVM shutdown/GC
9 Prism Subprocess Error Output (:runners:prism:java:test) ~240 0.64% PrismExecutor using ProcessBuilder.inheritIO() during intentional failure tests

This PR reduces 1, 2, 7, reduce logging lines by ~65%.

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README for a list of workflows and how to trigger them.

- Remove `'passed'` from default `testLogging` events in `BeamModulePlugin` so only skipped/failed tests and per-task summaries are logged.

- Downgrade the CI Maven Central mirror log message from `lifecycle` to `debug` in `Repositories.groovy` and `settings.gradle.kts` to avoid repeating it for every subproject.

- Remove `showStandardStreams = true` and `outputs.upToDateWhen {false}` overrides from `needsRunnerTests` and `examplesIntegrationTest` in `:runners:direct-java`, `:sdks:java:io:debezium`
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.26%. Comparing base (c275c97) to head (3b6c9a9).
⚠️ Report is 96 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40458      +/-   ##
============================================
+ Coverage     56.20%   65.26%   +9.05%     
- Complexity     2288    13915   +11627     
============================================
  Files          1123     1720     +597     
  Lines        178213   107826   -70387     
  Branches       1489    11243    +9754     
============================================
- Hits         100168    70371   -29797     
+ Misses        75524    33268   -42256     
- Partials       2521     4187    +1666     
Flag Coverage Δ
go ?
java 65.26% <ø> (-10.53%) ⬇️
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @chamikaramj for label java.
R: @derrickaw 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).

@derrickaw derrickaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! Thanks

@Abacn

Abacn commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

cc: @shunping

@Abacn

Abacn commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

AsyncWrapperTest failed on Windows test, not related to this change and should be fixed by #40449

@Abacn
Abacn merged commit 627d7fb into apache:master Oct 8, 2026
35 of 38 checks passed
@Abacn
Abacn deleted the logspam branch October 8, 2026 19:16
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.

3 participants