Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8287366: Improve test failure reporting in GHA #8901

Closed
wants to merge 2 commits into from

Conversation

magicus
Copy link
Member

@magicus magicus commented May 26, 2022

It is currently both tricky and tedious to figure out what went wrong when a jtreg test fails in GHA.

We should utilize the full potential of GitHub Action summaries and error annotations to make finding failures easier and more discoverable.

With this PR, the overview of failures are presented on the "Summary" page for the action (the top-most line to the left, with the outline house icon). Below the submit.yml dependency graph, you'll find the annotations, which will look like this:

Linux x86 (jdk/tier1 part 1)
Test run reported 34 test failure(s) and 0 error(s). See summary for details.

Below the annotations follow the summaries. Go have a look at the runs for this PR to see what it looks like! In short, there is a separate summary per test job. The first part lists the names of the failed tests. This will always be included. Below this (with links from the summary list) are detailed information for each failed test. This include the jtreg output, and the hs_err file(s), if present. The latter part has a limit from Github on 1 MB. If this limit is broken, no detailed information at all is presented (sorry 'bout that; GitHub's rules).

This PR is deliberately based on a commit prior to the fix for JDK-8287137 (Problemlist failing x86_32 tests after Loom integration), so you can see for yourself how the GHA runs looks in case of a "train wreck" testing situation, like on x86 after Loom. As you can see, most of the output part of the summaries got larger than the 1 MB limit, which means they were not shown. Only the summary for Linux x86 (hs/tier1 runtime) displays as intended. OTOH, this shows that the system has a "graceful degradation" mode for even large amount of failures like this. And, since I don't see a Loom v2.0 coming anytime soon, I believe this amount of failed tests are unlikely to be a realistic scenario.

Finally: the duplication in submit.yml is really, really annoying. :-( I have copied the same code block to three places. The fourth place, for Windows, do not get any support at this time. Concurrently with this change, I have started a separate branch where I split up submit.yml into reusable parts, using "callable workflows" and "custom actions". As part of this effort, I will also change the windows jobs to use cygwin bash instead of PowerShell. Until then, I could not be bothered to even think about implementing this functionality in PS. When that change is integrated, Windows will get this functionality for free, too.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8901/head:pull/8901
$ git checkout pull/8901

Update a local copy of the PR:
$ git checkout pull/8901
$ git pull https://git.openjdk.java.net/jdk pull/8901/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8901

View PR using the GUI difftool:
$ git pr show -t 8901

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8901.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 26, 2022

👋 Welcome back ihse! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 26, 2022
@openjdk
Copy link

openjdk bot commented May 26, 2022

@magicus The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label May 26, 2022
@mlbridge
Copy link

mlbridge bot commented May 26, 2022

Webrevs

Copy link
Contributor

@RealCLanger RealCLanger left a comment

Choose a reason for hiding this comment

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

This is a great improvement to GHA. I'm also looking forward to your de-duplication efforts and basing the windows steps on cygwin to benefit from the error handling there as well. Thanks for doing this!

@openjdk
Copy link

openjdk bot commented May 29, 2022

@magicus This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8287366: Improve test failure reporting in GHA

Reviewed-by: clanger

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 64 new commits pushed to the master branch:

  • a6e2e22: 8285008: JFR: jdk/jfr/jmx/streaming/TestClose.java failed with "Exception: Expected repository to be empty"
  • 2c461ac: 8287492: ProblemList compiler/jvmci/errors/TestInvalidDebugInfo.java
  • 6634037: 8287362: FieldAccessWatch testcase failed on AIX platform
  • 410a25d: 8286562: GCC 12 reports some compiler warnings
  • ed8e8ac: 8284400: Improve XPath exception handling
  • d3e781d: 8287223: C1: Inlining attempt through MH::invokeBasic() with null receiver
  • 0df4748: 8287463: JFR: Disable TestDevNull.java on Windows
  • 6520843: 8287003: InputStreamReader::read() can return zero despite writing a char in the buffer
  • 63eb0b7: 8282947: JFR: Dump on shutdown live-locks in some conditions
  • f2bc447: 8271406: Kitchensink failed with "assert(early->flag() == current->flag()) failed: Should be the same"
  • ... and 54 more: https://git.openjdk.java.net/jdk/compare/5974f5fed3ef888e8e64b1bf33793a7bcc4ca77c...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 29, 2022
@magicus
Copy link
Member Author

magicus commented Jun 1, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jun 1, 2022

Going to push as commit e0e15de.
Since your change was applied there have been 100 commits pushed to the master branch:

  • 7846971: 8236569: -Xss not multiple of 4K does not work for the main thread on macOS
  • 7159976: 8287520: Shrink x86_32 problemlists after JDK-8287437
  • 3deb58a: 8287318: ConcurrentModificationException in sun.net.httpserver.ServerImpl$Dispatcher
  • 8fc201e: 8285939: javadoc java.lang.Record should not have "Direct Known Subclasses:" section
  • f5bbade: 8287544: Replace uses of StringBuffer with StringBuilder in java.naming
  • 97bd4c2: 8286159: Memory leak in getAllConfigs of awt_GraphicsEnv.c:585
  • 8db5247: 8282771: Create test case for JDK-8262981
  • cfdbde1: 8282778: Create a regression test for JDK-4699544
  • 8df5f10: 8282857: Create a regression test for JDK-4702690
  • e0382c5: 8285401: Proxy class initializer should use 3-arg Class.forName to avoid unnecessary class initialization
  • ... and 90 more: https://git.openjdk.java.net/jdk/compare/5974f5fed3ef888e8e64b1bf33793a7bcc4ca77c...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 1, 2022
@openjdk openjdk bot closed this Jun 1, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 1, 2022
@openjdk
Copy link

openjdk bot commented Jun 1, 2022

@magicus Pushed as commit e0e15de.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@jaikiran
Copy link
Member

jaikiran commented Jun 6, 2022

With this PR, the overview of failures are presented on the "Summary" page for the action (the top-most line to the left, with the outline house icon).

@magicus, thank you. This is really useful. I didn't even know that this "Summary" page existed. I now checked this page on one of my PRs (which includes this commit) and it does indeed make it much simpler to analyze these failures.

@magicus
Copy link
Member Author

magicus commented Jun 6, 2022

@jaikiran Thanks for the kind words. I think I should perhaps do some tweaking to the Skara bots that link to the GHA runs, so it easier to go to the summary page.

@magicus magicus deleted the gha-problem-summary branch June 7, 2022 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
3 participants