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

Timestamps incorrect in .../console when truncated

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • timestamper-plugin
    • None
    • 1.480.3 (reported), 1.515-SNAPSHOT on Linux (reproduced)

      Created a test job

      <?xml version='1.0' encoding='UTF-8'?>
      <project>
        <actions/>
        <description></description>
        <keepDependencies>false</keepDependencies>
        <properties/>
        <scm class="hudson.scm.NullSCM"/>
        <canRoam>true</canRoam>
        <disabled>false</disabled>
        <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
        <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
        <triggers class="vector"/>
        <concurrentBuild>false</concurrentBuild>
        <builders>
          <hudson.tasks.Shell>
            <command>for x in 0 1 2 3 4; do for y in 0 1 2 3 4; do for z in 0 1 2 3 4; do echo $x$y$z; cat /etc/pnm2ppa.conf; sleep 1; done; done; done</command>
          </hudson.tasks.Shell>
        </builders>
        <publishers/>
        <buildWrappers>
          <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.5.3"/>
        </buildWrappers>
      </project>
      

      and ran it for a while, until there was enough output to truncate, then stopped it and compared .../console with .../consoleFull. The timestamps between the two are off by 1-2 seconds. For example, in console I see

      14:51:31 + echo 021
      14:51:31 021
      

      whereas in consoleFull I see

      14:51:33 + echo 021
      14:51:33 021
      

      and so on until the end of the file.

      TimestampAnnotatorFactory.getOffset looked suspicious, though its default of 150Kb does still match the current value in Run/console.jelly.

          [JENKINS-17779] Timestamps incorrect in .../console when truncated

          The difference can sometimes be larger, e.g. JENKINS-17697.

          Steven G Brown added a comment - The difference can sometimes be larger, e.g. JENKINS-17697 .

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          pom.xml
          src/main/java/hudson/plugins/timestamper/TimestampsIO.java
          src/test/java/hudson/plugins/timestamper/annotator/Jenkins17779Test.java
          http://jenkins-ci.org/commit/timestamper-plugin/d7ace70864ac7c6891430d0dc7d153bdf02837da
          Log:
          [FIXED JENKINS-17779]

          The fast-forwarding logic had a problem dealing with empty lines

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: pom.xml src/main/java/hudson/plugins/timestamper/TimestampsIO.java src/test/java/hudson/plugins/timestamper/annotator/Jenkins17779Test.java http://jenkins-ci.org/commit/timestamper-plugin/d7ace70864ac7c6891430d0dc7d153bdf02837da Log: [FIXED JENKINS-17779] The fast-forwarding logic had a problem dealing with empty lines

          Included in Timestamper 1.5.5.

          Steven G Brown added a comment - Included in Timestamper 1.5.5.

            stevengbrown Steven G Brown
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: