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

Run.ID_FORMATTER caches stale timezone values

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      If you change the timezone while Jenkins is running, the value of Run.ID_FORMATTER in some threads will reflect the new TZ while that in other threads reflects the old TZ. (Apparently SimpleDateFormat copies the TZ in effect when it was constructed.)

      In particular, executor threads (which create the ID) are likely to use the old value while HTTP service threads are likely to use the new value. The result is that Run.rootDir when evaluated from an HTTP thread refers to a nonexistent directory, so the console appears to be empty, etc.

      Since the format string omits Z the build’s ID is also ambiguous—must be interpreted according to the server’s local TZ.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            core/src/main/java/hudson/model/Run.java
            core/src/test/java/hudson/model/RunTest.java
            core/src/test/java/hudson/model/StubJob.java
            http://jenkins-ci.org/commit/jenkins/d84eca4510f2b259273571ebcc46387f2e88944f
            Log:
            [FIXED JENKINS-15816] Run.ID_FORMATTER caches stale timezone values.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/Run.java core/src/test/java/hudson/model/RunTest.java core/src/test/java/hudson/model/StubJob.java http://jenkins-ci.org/commit/jenkins/d84eca4510f2b259273571ebcc46387f2e88944f Log: [FIXED JENKINS-15816] Run.ID_FORMATTER caches stale timezone values.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/ea13e2aed8b126147b4f24edef2e93d54292761f
            Log:
            JENKINS-15816 Noted in wrong section.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/ea13e2aed8b126147b4f24edef2e93d54292761f Log: JENKINS-15816 Noted in wrong section.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2067
            [FIXED JENKINS-15816] Run.ID_FORMATTER caches stale timezone values. (Revision d84eca4510f2b259273571ebcc46387f2e88944f)
            JENKINS-15816 Noted in wrong section. (Revision ea13e2aed8b126147b4f24edef2e93d54292761f)

            Result = UNSTABLE
            Jesse Glick : d84eca4510f2b259273571ebcc46387f2e88944f
            Files :

            • changelog.html
            • core/src/test/java/hudson/model/RunTest.java
            • core/src/test/java/hudson/model/StubJob.java
            • core/src/main/java/hudson/model/Run.java

            Jesse Glick : ea13e2aed8b126147b4f24edef2e93d54292761f
            Files :

            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2067 [FIXED JENKINS-15816] Run.ID_FORMATTER caches stale timezone values. (Revision d84eca4510f2b259273571ebcc46387f2e88944f) JENKINS-15816 Noted in wrong section. (Revision ea13e2aed8b126147b4f24edef2e93d54292761f) Result = UNSTABLE Jesse Glick : d84eca4510f2b259273571ebcc46387f2e88944f Files : changelog.html core/src/test/java/hudson/model/RunTest.java core/src/test/java/hudson/model/StubJob.java core/src/main/java/hudson/model/Run.java Jesse Glick : ea13e2aed8b126147b4f24edef2e93d54292761f Files : changelog.html
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/model/Run.java
            http://jenkins-ci.org/commit/jenkins/7bf6c5ca6e09ce2add22e0685db63da658b5fe17
            Log:
            JENKINS-15816 Working around javac bug triggered by d84eca4.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Run.java http://jenkins-ci.org/commit/jenkins/7bf6c5ca6e09ce2add22e0685db63da658b5fe17 Log: JENKINS-15816 Working around javac bug triggered by d84eca4.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2068
            JENKINS-15816 Working around javac bug triggered by d84eca4. (Revision 7bf6c5ca6e09ce2add22e0685db63da658b5fe17)

            Result = UNSTABLE
            Jesse Glick : 7bf6c5ca6e09ce2add22e0685db63da658b5fe17
            Files :

            • core/src/main/java/hudson/model/Run.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2068 JENKINS-15816 Working around javac bug triggered by d84eca4. (Revision 7bf6c5ca6e09ce2add22e0685db63da658b5fe17) Result = UNSTABLE Jesse Glick : 7bf6c5ca6e09ce2add22e0685db63da658b5fe17 Files : core/src/main/java/hudson/model/Run.java

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: