Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16215

Avoid unnecessary downloads in FilePath.installIfNecessaryFrom

      FilePath.installIfNecessaryFrom is used by the DownloadFromUrlInstaller when installing things like the JDK. The current implementation issues a regular GET request just to access the 'last modified' header. This also seems to be triggered per executor resulting in lots of stress on the server hosting the JDK zip/tar.gz.

      installIfNecessaryFrom could be changed to read the cached timestamp first, and issue that in the 'If-Modified-Since' header. http://docs.oracle.com/javase/6/docs/api/java/net/URLConnection.html#setIfModifiedSince%28long%29

          [JENKINS-16215] Avoid unnecessary downloads in FilePath.installIfNecessaryFrom

          Lars Hvile added a comment -

          Lars Hvile added a comment - Fixed in https://github.com/jenkinsci/jenkins/pull/660 .

          Code changed in jenkins
          User: Lars Hvile
          Path:
          core/src/main/java/hudson/FilePath.java
          core/src/test/java/hudson/FilePathTest.java
          http://jenkins-ci.org/commit/jenkins/35f7653b7b28bb65b116f16282d9bea567405f61
          Log:
          JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom.

          The updated version uses the locally cached timestamp, '.timestamp', to set the
          'If-Modified-Since' header. 304 Not Modified responses are dealt with by
          aborting the installation.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Lars Hvile Path: core/src/main/java/hudson/FilePath.java core/src/test/java/hudson/FilePathTest.java http://jenkins-ci.org/commit/jenkins/35f7653b7b28bb65b116f16282d9bea567405f61 Log: JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom. The updated version uses the locally cached timestamp, '.timestamp', to set the 'If-Modified-Since' header. 304 Not Modified responses are dealt with by aborting the installation.

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          core/src/main/java/hudson/FilePath.java
          core/src/test/java/hudson/FilePathTest.java
          http://jenkins-ci.org/commit/jenkins/586af3c1ee910e99a50dde8d8b3e7aa68df06716
          Log:
          Merge pull request #660 from larshvile/master

          [FIXED JENKINS-16215] Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom

          Compare: https://github.com/jenkinsci/jenkins/compare/6b1cc4702417...586af3c1ee91

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/FilePath.java core/src/test/java/hudson/FilePathTest.java http://jenkins-ci.org/commit/jenkins/586af3c1ee910e99a50dde8d8b3e7aa68df06716 Log: Merge pull request #660 from larshvile/master [FIXED JENKINS-16215] Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom Compare: https://github.com/jenkinsci/jenkins/compare/6b1cc4702417...586af3c1ee91

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          core/src/main/java/hudson/FilePath.java
          http://jenkins-ci.org/commit/jenkins/19b31687c870bba50bb181c5d08486151b1839a9
          Log:
          JENKINS-16215 : changelog

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html core/src/main/java/hudson/FilePath.java http://jenkins-ci.org/commit/jenkins/19b31687c870bba50bb181c5d08486151b1839a9 Log: JENKINS-16215 : changelog

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2202
          JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom. (Revision 35f7653b7b28bb65b116f16282d9bea567405f61)

          Result = SUCCESS
          lars : 35f7653b7b28bb65b116f16282d9bea567405f61
          Files :

          • core/src/main/java/hudson/FilePath.java
          • core/src/test/java/hudson/FilePathTest.java

          dogfood added a comment - Integrated in jenkins_main_trunk #2202 JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom. (Revision 35f7653b7b28bb65b116f16282d9bea567405f61) Result = SUCCESS lars : 35f7653b7b28bb65b116f16282d9bea567405f61 Files : core/src/main/java/hudson/FilePath.java core/src/test/java/hudson/FilePathTest.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2203
          JENKINS-16215 : changelog (Revision 19b31687c870bba50bb181c5d08486151b1839a9)

          Result = UNSTABLE
          Christoph Kutzinski : 19b31687c870bba50bb181c5d08486151b1839a9
          Files :

          • core/src/main/java/hudson/FilePath.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2203 JENKINS-16215 : changelog (Revision 19b31687c870bba50bb181c5d08486151b1839a9) Result = UNSTABLE Christoph Kutzinski : 19b31687c870bba50bb181c5d08486151b1839a9 Files : core/src/main/java/hudson/FilePath.java changelog.html

          Code changed in jenkins
          User: Lars Hvile
          Path:
          core/src/main/java/hudson/FilePath.java
          core/src/test/java/hudson/FilePathTest.java
          http://jenkins-ci.org/commit/jenkins/cae2f4d4a2f6d9c8c13cf50c46baeb63f45c4501
          Log:
          JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom.

          The updated version uses the locally cached timestamp, '.timestamp', to set the
          'If-Modified-Since' header. 304 Not Modified responses are dealt with by
          aborting the installation.
          (cherry picked from commit 35f7653b7b28bb65b116f16282d9bea567405f61)

          Conflicts:
          core/src/test/java/hudson/FilePathTest.java

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Lars Hvile Path: core/src/main/java/hudson/FilePath.java core/src/test/java/hudson/FilePathTest.java http://jenkins-ci.org/commit/jenkins/cae2f4d4a2f6d9c8c13cf50c46baeb63f45c4501 Log: JENKINS-16215 Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom. The updated version uses the locally cached timestamp, '.timestamp', to set the 'If-Modified-Since' header. 304 Not Modified responses are dealt with by aborting the installation. (cherry picked from commit 35f7653b7b28bb65b116f16282d9bea567405f61) Conflicts: core/src/test/java/hudson/FilePathTest.java

          Code changed in jenkins
          User: Christoph Kutzinski
          Path:
          changelog.html
          core/src/main/java/hudson/FilePath.java
          http://jenkins-ci.org/commit/jenkins/15c37393910da8a76c8e2224486e9a0b2cf7528f
          Log:
          JENKINS-16215 : changelog(cherry picked from commit 19b31687c870bba50bb181c5d08486151b1839a9)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html core/src/main/java/hudson/FilePath.java http://jenkins-ci.org/commit/jenkins/15c37393910da8a76c8e2224486e9a0b2cf7528f Log: JENKINS-16215 : changelog(cherry picked from commit 19b31687c870bba50bb181c5d08486151b1839a9) Conflicts: changelog.html

            Unassigned Unassigned
            hultee Lars Hvile
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: