Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Enhance comments in "managed" github issues v2
Unfortunately the simple first take in #628 didn't work since it looks like the GitHub API doesn't allow us to access the workflow runs while the workflow is still running. To work around this, this new approach introduces and runs a new "GitHub Issue Updater" workflow which runs after the "Nightly CI" and "Weekly CI" workflows. This comes with the following complication. The reporter is run once for all jobs in the matrix, so it needs to figure out which failure should be reported to which issue in which repository. For details about the implementation please see the following comment also available in the jbang script: // Unfortunately it's not possible to pass information from a triggering // workflow to the triggered workflow (in this case Nightly/Weekly CI to // the Github Issue Updater). As a result, to work around this, we parse // the logs of the jobs of the workflow that triggered this workflow, in // these logs we can find information like the inputs "issue-number", // "issue-repo" etc. But we still need to somehow group the jobs // corresponding to the detected issue-numbers. To do so, we first parse // the logs of the "Set distribution" job, which is the first job of each // configuration. This job contains the issue-number and issue-repo inputs // which we use to get the github issue and map it to the job name prefix // of jobs that are part of the same configuration. // // We then check the status of the jobs of the triggered workflow, and // if any of them failed, we check if the job name starts with one of the // job name prefixes we found earlier. If it does, we add it to the list // of failed jobs for the corresponding issue. // // Finally, we process the list of failed jobs for each issue, and if // the issue is still open, we add a comment with the list of failed jobs // and the filtered logs of the first failed job. // // Mandrel integration tests are treated specially, as they have a fixed // issue repository, we can directly get the issue number from the logs // of the job, and we don't need to group the jobs by issue number, since // the structure of the workflow is simpler. The resulting comment in the GitHub issue will look like this: The build is still failing! * [Q main M 22 latest / Q IT Data5](https://github.com/graalvm/mandrel/actions/runs/7108970473/job/19353697276) * Step: Build with Maven Filtered Logs: ``` 2023-12-06T02:12:48.3045067Z Error: Class initialization of io.vertx.pgclient.impl.codec.DataTypeCodec failed. Use the option 2023-12-06T02:17:23.8202565Z Error: Class initialization of io.vertx.pgclient.impl.codec.DataTypeCodec failed. Use the option 2023-12-06T02:20:25.5812579Z [INFO] Quarkus - Integration Tests - JPA - PostgreSQL ..... FAILURE [04:01 min] 2023-12-06T02:20:25.5815363Z [INFO] Quarkus - Integration Tests - Hibernate Reactive - PostgreSQL FAILURE [01:09 min] 2023-12-06T02:20:25.5818516Z [INFO] Quarkus - Integration Tests - Reactive Pg Client ... FAILURE [ 58.794 s] ``` * [Q main M 22 latest / Q IT Data7](https://github.com/graalvm/mandrel/actions/runs/7108970473/job/19353697645) * Step: Build with Maven Filtered Logs: ``` 2023-12-06T02:21:35.5488777Z Error: Class initialization of io.vertx.pgclient.impl.codec.DataTypeCodec failed. Use the option 2023-12-06T02:23:24.7112818Z Error: Class initialization of io.vertx.pgclient.impl.codec.DataTypeCodec failed. Use the option 2023-12-06T02:34:32.8654383Z [INFO] Quarkus - Integration Tests - Hibernate Reactive with Panache FAILURE [01:29 min] 2023-12-06T02:34:32.8655349Z [INFO] Quarkus - Integration Tests - Hibernate Reactive with Panache and Kotlin FAILURE [01:49 min] ``` * [Q main M 22 latest / Q IT Security3](https://github.com/graalvm/mandrel/actions/runs/7108970473/job/19353698616) * Step: Build with Maven Filtered Logs: ``` 2023-12-06T02:19:21.8703399Z Error: Class initialization of io.vertx.pgclient.impl.codec.DataTypeCodec failed. Use the option 2023-12-06T02:26:58.5434481Z [INFO] Quarkus - Integration Tests - Security WebAuthn .... FAILURE [01:36 min] ``` * [Q main M 22 latest / Q IT Misc2](https://github.com/graalvm/mandrel/actions/runs/7108970473/job/19353699213) * Step: Build with Maven Filtered Logs: ``` 2023-12-06T02:11:17.0198258Z Error: Class initialization of com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl failed. Use the option 2023-12-06T02:21:35.8962084Z [INFO] Quarkus - Integration Tests - Test Extension - Tests FAILURE [ 32.070 s] ``` * [Q main M 22 latest / Q IT AWT, ImageIO and Java2D](https://github.com/graalvm/mandrel/actions/runs/7108970473/job/19353700284) * Step: Build with Maven Filtered Logs: ``` 2023-12-06T02:05:32.5303045Z Error: Error loading a referenced type: com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported method jdk.internal.loader.NativeLibrary.findEntry0(long, String) is reachable 2023-12-06T02:07:51.7787718Z [INFO] Quarkus - Integration Tests - AWT .................. FAILURE [01:24 min] ``` Link to failing CI run: https://github.com/graalvm/mandrel/actions/runs/7108970473
- Loading branch information