jenkinsci / docker

Docker official jenkins repo
https://hub.docker.com/r/jenkins/jenkins
MIT License
6.73k stars 4.56k forks source link

fix: Adapt to recent changes in JDK download URL response #1936

Closed MarkEWaite closed 1 month ago

MarkEWaite commented 1 month ago

fix: Adapt to recent changes in JDK download URL response

Parse the JDK redirect URL for a case insensitive redirect location

Mozilla documentation shows the HTTP 307 response as:

location: /en-US/docs/Learn/JavaScript/Client-side_web_APIs/Fetching_data content-type: text/plain; charset=utf-8 date: Fri, 19 Jul 2024 12:57:17 GMT

Previously, the response must have used "Location:" rather than "location:"

Include URL in download failure error message

Much easier to diagnose failures if the requesting URL is included in the message. Since the failure will end that portion of the build job, the extra verbosity is not additionally harmful.

Testing done

Confirmed that make build fails without this change and that it succeeds with this change. Builds are currently failing on the master branch.

Rely on ci.jenkins.io for deeper testing.

Submitter checklist

MarkEWaite commented 1 month ago

@gounthar if you're available, could you review this pull request?

gounthar commented 1 month ago

Thanks, Mark Unfortunately, the job failed on Alpine/JDK17.

MarkEWaite commented 1 month ago

Thanks, Mark Unfortunately, the job failed on Alpine/JDK17.

Thanks for looking! That's a known transient failure. The test is flaky and we've not been able to find the steps to make it more reliable. I started a new build. The new build has passed in the configuration that failed the first build.