adoptium / aqa-test-tools

Home of Test Results Summary Service (TRSS) and PerfNext. These tools are designed to improve our ability to monitor and triage tests at the Adoptium project. The code is generic enough that it is extensible for use by any project that needs to monitor multiple CI servers and aggregate their results.
Apache License 2.0
28 stars 79 forks source link

Check if we are setting jdkDate correctly for both types of JDK implementations #888

Open smlambert opened 3 weeks ago

smlambert commented 3 weeks ago

We parse the contents of the output of java -version to set jdkDate (which is meant to indicate build date as opposed to some future release date) in this block of code: https://github.com/adoptium/aqa-test-tools/blob/master/TestResultSummaryService/parsers/Parser.js#L12-L33

Output from java -version is quite different depending on what jdk implementation is used.

hotspot impls look like:

16:38:54  =JAVA VERSION OUTPUT BEGIN=
16:38:54  openjdk version "21.0.4-beta" 2024-07-16
16:38:54  OpenJDK Runtime Environment Temurin-21.0.4+6-202406261902 (build 21.0.4-beta+6-ea)
16:38:54  OpenJDK 64-Bit Server VM Temurin-21.0.4+6-202406261902 (build 21.0.4-beta+6-ea, mixed mode, sharing)
16:38:54  =JAVA VERSION OUTPUT END=

openj9 impls look like:

11:53:15  =JAVA VERSION OUTPUT BEGIN=
11:53:19  openjdk version "11.0.24-internal" 2024-07-16
11:53:19  OpenJDK Runtime Environment (build 11.0.24-internal+0-adhoc.jenkins.BuildJDK11aarch64macPersonal)
11:53:19  Eclipse OpenJ9 VM (build master-2a2df9f1117, JRE 11 Mac OS X aarch64-64-Bit 20240627_514 (JIT enabled, AOT enabled)
11:53:19  OpenJ9   - 2a2df9f1117
11:53:19  OMR      - 47a9d248db0
11:53:19  JCL      - c535515f053 based on jdk-11.0.24+6)
11:53:19  =JAVA VERSION OUTPUT END=

See related comments after https://github.com/adoptium/temurin-build/issues/1456#issuecomment-2194653259