-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins 2.426.2 and Jenkins 2.438 (and much, much older)
-
-
2.439, 2.426.3
Users reported in community.jenkins.io that they were seeing repeated downloads of the Azul JDK.
The content delivery network of Azul Systems (provider of JDK implementations) stopped providing the last-modified header recently. The Jenkins FilePath implementation depends on the HTTP last-modified header even though the MDN description says that it is less accurate that the ETag header.
The Groovy console code that I used to confirm the behavior of the FilePath.installIfNecessaryFrom method is:
URL archive = new URL("https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-fx-jdk17.0.9-linux_x64.tar.gz") println("URL of archive is " + archive) TaskListener listener = TaskListener.NULL File jdk17Dir = new File("/tmp/jdk17.0.9") println("Java 17 dir is " + jdk17Dir + " and " + (jdk17Dir.exists() ? "exists" : "does not exist")) File timestamp = new File("/tmp/jdk17.0.9/.timestamp") if (timestamp.exists()) { println("Timestamp file " + timestamp + " exists and has a last modified date of " + timestamp.lastModified()) } else { println("Timestamp file " + timestamp + " does not exist") } FilePath jdk17FilePath = new FilePath(jdk17Dir) println("Java 17 FilePath is " + jdk17FilePath + " and " + (jdk17FilePath.exists() ? "exists" : "does not exist")) boolean result = jdk17FilePath.installIfNecessaryFrom(archive, listener, "Installing JDK 17 into " + jdk17Dir) println("Result of installIfNecessaryFrom is " + result)
When that code is run the first time, it downloads JDK 17.0.9 from the Azul Systems CDN. When that code is run the second time, it report that the timestamp of the file is 0 (the epoch) and downloads JDK 17.0.9 again.
The FilePath implementation should be extended to support the ETag header, since that is considered more accurate than the last-modified header.
[JENKINS-72469] Tool downloads repeatedly if HTTP server does not send last-modified HTTP header
Environment | Original: Jenkins 2.426.2 and Jenkins 2.438 (and | New: Jenkins 2.426.2 and Jenkins 2.438 (and older) |
Environment | Original: Jenkins 2.426.2 and Jenkins 2.438 (and older) | New: Jenkins 2.426.2 and Jenkins 2.438 (and much, much older) |
Description |
Original:
Users reported in [community.jenkins.io|https://community.jenkins.io/t/job-stuck-on-unpacking-global-jdk-tool/11272] that they were seeing repeated downloads of the Azul JDK.
The content delivery network of Azul Systems (provider of JDK implementations) stopped providing the {{last-modified}} header recently. The Jenkins FilePath implementation [depends on the HTTP last-modified header|https://javadoc.jenkins-ci.org/hudson/FilePath.html#installIfNecessaryFrom(java.net.URL,hudson.model.TaskListener,java.lang.String)] even though the [MDN description|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified] says that it is less accurate that the ETag header. The Azul Systems CDN seems to have stopped providing the {{last-modified}} header. The Groovy console code that I used to confirm the behavior of the {{FilePath.installIfNecessaryFrom}} method is: {code} URL archive = new URL("https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-fx-jdk17.0.9-linux_x64.tar.gz") println("URL of archive is " + archive) TaskListener listener = TaskListener.NULL File jdk17Dir = new File("/tmp/jdk17.0.9") println("Java 17 dir is " + jdk17Dir + " and " + (jdk17Dir.exists() ? "exists" : "does not exist")) File timestamp = new File("/tmp/jdk17.0.9/.timestamp") if (timestamp.exists()) { println("Timestamp file " + timestamp + " exists and has a last modified date of " + timestamp.lastModified()) } else { println("Timestamp file " + timestamp + " does not exist") } FilePath jdk17FilePath = new FilePath(jdk17Dir) println("Java 17 FilePath is " + jdk17FilePath + " and " + (jdk17FilePath.exists() ? "exists" : "does not exist")) boolean result = jdk17FilePath.installIfNecessaryFrom(archive, listener, "Installing JDK 17 into " + jdk17Dir) println("Result of installIfNecessaryFrom is " + result) {code} When that code is run the first time, it downloads JDK 17.0.9 from the Azul Systems CDN. When that code is run the second time, it report that the timestamp of the file is 0 (the epoch) and downloads JDK 17.0.9 again. The FilePath implementation should be extended to support the ETags header, since that is considered more accurate than the {{last-modified}} header. |
New:
Users reported in [community.jenkins.io|https://community.jenkins.io/t/job-stuck-on-unpacking-global-jdk-tool/11272] that they were seeing repeated downloads of the Azul JDK.
The content delivery network of Azul Systems (provider of JDK implementations) stopped providing the {{last-modified}} header recently. The Jenkins FilePath implementation [depends on the HTTP last-modified header|https://javadoc.jenkins-ci.org/hudson/FilePath.html#installIfNecessaryFrom(java.net.URL,hudson.model.TaskListener,java.lang.String)] even though the [MDN description|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified] says that it is less accurate that the ETag header. The Azul Systems CDN seems to have stopped providing the {{last-modified}} header. The Groovy console code that I used to confirm the behavior of the {{FilePath.installIfNecessaryFrom}} method is: {code} URL archive = new URL("https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-fx-jdk17.0.9-linux_x64.tar.gz") println("URL of archive is " + archive) TaskListener listener = TaskListener.NULL File jdk17Dir = new File("/tmp/jdk17.0.9") println("Java 17 dir is " + jdk17Dir + " and " + (jdk17Dir.exists() ? "exists" : "does not exist")) File timestamp = new File("/tmp/jdk17.0.9/.timestamp") if (timestamp.exists()) { println("Timestamp file " + timestamp + " exists and has a last modified date of " + timestamp.lastModified()) } else { println("Timestamp file " + timestamp + " does not exist") } FilePath jdk17FilePath = new FilePath(jdk17Dir) println("Java 17 FilePath is " + jdk17FilePath + " and " + (jdk17FilePath.exists() ? "exists" : "does not exist")) boolean result = jdk17FilePath.installIfNecessaryFrom(archive, listener, "Installing JDK 17 into " + jdk17Dir) println("Result of installIfNecessaryFrom is " + result) {code} When that code is run the first time, it downloads JDK 17.0.9 from the Azul Systems CDN. When that code is run the second time, it report that the timestamp of the file is 0 (the epoch) and downloads JDK 17.0.9 again. The FilePath implementation should be extended to support the ETag header, since that is considered more accurate than the {{last-modified}} header. |
Description |
Original:
Users reported in [community.jenkins.io|https://community.jenkins.io/t/job-stuck-on-unpacking-global-jdk-tool/11272] that they were seeing repeated downloads of the Azul JDK.
The content delivery network of Azul Systems (provider of JDK implementations) stopped providing the {{last-modified}} header recently. The Jenkins FilePath implementation [depends on the HTTP last-modified header|https://javadoc.jenkins-ci.org/hudson/FilePath.html#installIfNecessaryFrom(java.net.URL,hudson.model.TaskListener,java.lang.String)] even though the [MDN description|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified] says that it is less accurate that the ETag header. The Azul Systems CDN seems to have stopped providing the {{last-modified}} header. The Groovy console code that I used to confirm the behavior of the {{FilePath.installIfNecessaryFrom}} method is: {code} URL archive = new URL("https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-fx-jdk17.0.9-linux_x64.tar.gz") println("URL of archive is " + archive) TaskListener listener = TaskListener.NULL File jdk17Dir = new File("/tmp/jdk17.0.9") println("Java 17 dir is " + jdk17Dir + " and " + (jdk17Dir.exists() ? "exists" : "does not exist")) File timestamp = new File("/tmp/jdk17.0.9/.timestamp") if (timestamp.exists()) { println("Timestamp file " + timestamp + " exists and has a last modified date of " + timestamp.lastModified()) } else { println("Timestamp file " + timestamp + " does not exist") } FilePath jdk17FilePath = new FilePath(jdk17Dir) println("Java 17 FilePath is " + jdk17FilePath + " and " + (jdk17FilePath.exists() ? "exists" : "does not exist")) boolean result = jdk17FilePath.installIfNecessaryFrom(archive, listener, "Installing JDK 17 into " + jdk17Dir) println("Result of installIfNecessaryFrom is " + result) {code} When that code is run the first time, it downloads JDK 17.0.9 from the Azul Systems CDN. When that code is run the second time, it report that the timestamp of the file is 0 (the epoch) and downloads JDK 17.0.9 again. The FilePath implementation should be extended to support the ETag header, since that is considered more accurate than the {{last-modified}} header. |
New:
Users reported in [community.jenkins.io|https://community.jenkins.io/t/job-stuck-on-unpacking-global-jdk-tool/11272] that they were seeing repeated downloads of the Azul JDK.
The content delivery network of Azul Systems (provider of JDK implementations) stopped providing the {{last-modified}} header recently. The Jenkins FilePath implementation [depends on the HTTP last-modified header|https://javadoc.jenkins-ci.org/hudson/FilePath.html#installIfNecessaryFrom(java.net.URL,hudson.model.TaskListener,java.lang.String)] even though the [MDN description|https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified] says that it is less accurate that the ETag header. The Groovy console code that I used to confirm the behavior of the {{FilePath.installIfNecessaryFrom}} method is: {code} URL archive = new URL("https://cdn.azul.com/zulu/bin/zulu17.46.19-ca-fx-jdk17.0.9-linux_x64.tar.gz") println("URL of archive is " + archive) TaskListener listener = TaskListener.NULL File jdk17Dir = new File("/tmp/jdk17.0.9") println("Java 17 dir is " + jdk17Dir + " and " + (jdk17Dir.exists() ? "exists" : "does not exist")) File timestamp = new File("/tmp/jdk17.0.9/.timestamp") if (timestamp.exists()) { println("Timestamp file " + timestamp + " exists and has a last modified date of " + timestamp.lastModified()) } else { println("Timestamp file " + timestamp + " does not exist") } FilePath jdk17FilePath = new FilePath(jdk17Dir) println("Java 17 FilePath is " + jdk17FilePath + " and " + (jdk17FilePath.exists() ? "exists" : "does not exist")) boolean result = jdk17FilePath.installIfNecessaryFrom(archive, listener, "Installing JDK 17 into " + jdk17Dir) println("Result of installIfNecessaryFrom is " + result) {code} When that code is run the first time, it downloads JDK 17.0.9 from the Azul Systems CDN. When that code is run the second time, it report that the timestamp of the file is 0 (the epoch) and downloads JDK 17.0.9 again. The FilePath implementation should be extended to support the ETag header, since that is considered more accurate than the {{last-modified}} header. |
Assignee | New: Mark Waite [ markewaite ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "PR-8814 adds ETag support to tool downloader (Web Link)" [ 29406 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Issue Type | Original: Improvement [ 4 ] | New: Bug [ 1 ] |
Labels | New: lts-candidate |