ci: show Javadoc errors as test failures#24378
Open
Artur- wants to merge 6 commits into
Open
Conversation
caalador
reviewed
May 20, 2026
Contributor
Contributor
caalador
requested changes
May 22, 2026
Make failOnError explicit on maven-javadoc-plugin so Javadoc errors visibly break the build instead of being buried in log output.
Maven prefixes every Javadoc tool stderr line with [ERROR], so the single real "error:" line gets lost among 100+ identically-prefixed warning lines. Grep the actual error lines out of the per-shard Maven log and write them to GITHUB_STEP_SUMMARY so they show up at the top of the failing unit-tests job. Also drops the redundant <failOnError>true</failOnError> override — that's already the maven-javadoc-plugin default.
DO NOT MERGE. Temporary broken {@link} to a non-existent class so the
unit-tests job fails with a real Javadoc error, letting us confirm the
"Surface Javadoc errors" step actually surfaces it in the PR summary.
Revert before merge.
Generate a synthetic JUnit XML in the unit-tests job whenever the shard log contains Javadoc errors, written to a path that the existing "Package test-report files" step already tars up. The Test Results job's publish-unit-test-result-action then picks it up alongside the real surefire/failsafe reports, so the Javadoc failures appear in the same PR comment and job summary as the rest of the test failures rather than only in the per-shard step summary.
f34f9c3 to
52212b0
Compare
Moves the inline Python heredoc out of validation.yml and into scripts/javadocErrorsToJUnit.py so the workflow stays readable and the extractor can be edited and tested as a normal file.
….java Co-authored-by: caalador <mikael.grankvist@vaadin.com>
Member
Author
|
caalador
reviewed
May 25, 2026
| os.makedirs(os.path.dirname(out_path) or '.', exist_ok=True) | ||
| with open(out_path, 'w', encoding='utf-8') as f: | ||
| f.write('\n'.join(parts)) | ||
| print(f'Wrote {out_path} with {n} Javadoc failure(s)') |
Contributor
There was a problem hiding this comment.
As this print shows directly under the Convert Javadoc errors to JUnit XML dropdown in the job log could we also print the exceptions here directly.
I had a hard time finding the test results page as it is not reachable directly from the failed job as that is what one always opens to see what failed and would probably not even think about checking inside runs and just do a search and find instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






Add a CI step that converts Javadoc errors found in the Maven log of the failing
unit-testsshard into a synthetic JUnit XML report, so the existingpublish-unit-test-result-actionsurfaces them in the same PR comment and job summary as regular test failures