aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

trapme: Improve curl error detection when downloading JDKs

Open sxa opened this issue 1 year ago • 0 comments

This was split out from somethinf in the Jult/October TCK retrospectives - action is to see if we can produce a more useful error message to the end user in the case of curl failures, and probably abort if it's fatal and we won't be able to run java -version

--- Message below copied from TC#400

Similar to the first comment, if the curl download of a build in the TC jobs fail then it can be non-obvious why.

  • Did the curl fail?
  • Did it give a zero-length file?
  • Was the URL wrong and so the request gave a 404 back?
  • Did it download an invalid thing?
  • Was there an authentication issue?

I think at one time or another I've hit issues with most of those being the cause :-)

For example, an invalid value can lead to something like this from the logs, although unlike the previous comment this one does abort the job almost immediately. I've hit it a few times and adding some more debug would make this easier to diagnose when (usually some form of user error) causes it to occur.

1:20:41  _ENCODE_FILE_NEW=UNTAGGED curl -OLJSks --user ****:**** https://ci.adoptium.net/job/build-scripts/job/jobs/job/evaluation/job/jobs/job/jdk17u/job/jdk17u-evaluation-alpine-linux-aarch64-temurin/lastSuccessfulBuild/artifact/workspace/target/OpenJDK17U-jdk_aarch64_alpine-linux_hotspot_2023-07-16-12-05.tar.gz
11:20:50  Uncompressing file: OpenJDK17U-jdk_aarch64_alpine-linux_hotspot_2023-07-16-12-05.tar.gz ...
11:20:52  Run /home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java -version
11:20:52  =JAVA VERSION OUTPUT BEGIN=
11:20:52  ./get.sh: line 672: /home/jenkins/workspace/Grinder/openjdkbinary/j2sdk-image/bin/java: No such file or directory

sxa avatar Nov 28 '23 16:11 sxa