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

Last Duration shows only last successful build results.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Linux, using the 1.401 .deb file. There's a bug with Last Duration not displaying at all in 1.403, and I didn't see a 1.402 .deb, so that's why I went with 1.401.

      The last duration value displayed in the All view (and possibly other views) only shows the last successful build's duration. I guess I would have expected the duration of the last build, regardless of status.

      Prereqs: You will need python, the py.test addon (easy_install pytest), and the file system SCM plugin for jenkins.

      To duplicate, create a free-form job. Copy the attached sample python unit test file to an area such as ~/tmp. Using the file system SCM plugin, point it at ~/scm. For the build step, choose 'shell' and use 'py.test --junitxml=results.xml' Now kick off the build. The test will pass, and the Last Duration on the main page will probably show something like 1.0 - 1.5s.

      Now, edit the provided sample unit test file. Change the sleep value to something longer (60) and make the assertion fail (1,1 --> 1,2). Kick off the build again. Now the build will fail. On the main page, the Last Duration still shows 1.0 - 1.5s. However, if you go to the lastBuild for the job, the duration in the upper right is correct and says something like "Took 1 min 0 sec", providing a link to the Build Time Trend.

      If this is the default behavior for Last Duration, I understand. But is it possible that it can be made configurable so that I can still see how long my failing unit tests are taking?

          [JENKINS-9145] Last Duration shows only last successful build results.

          Scott Sturdivant added a comment - - edited

          Attachment added now... sorry!

          Scott Sturdivant added a comment - - edited Attachment added now... sorry!

          Ben Golding added a comment -

          Same issue if the last build was 'aborted' (e.g. by timeout): the duration displayed should be exactly the same as the timeout setting.

          Ben Golding added a comment - Same issue if the last build was 'aborted' (e.g. by timeout): the duration displayed should be exactly the same as the timeout setting.

          velenhaupt added a comment -

          Any update on this ? Should it be fixed ?

          velenhaupt added a comment - Any update on this ? Should it be fixed ?

          Daniel Beck added a comment -

          Jenkins has always worked like this. Looks more like a documentation bug to me. (The core columns really should have help boxes...)

          "Real" last duration column should probably be implemented in a plugin.

          Daniel Beck added a comment - Jenkins has always worked like this. Looks more like a documentation bug to me. (The core columns really should have help boxes...) "Real" last duration column should probably be implemented in a plugin.

          Martin Jost added a comment -

          Our CI team just stumbled across this as well.
          We know about "Last successful artifacts" and stuff like that. Here it is clearly marked as such (still it is biting some of our users from time to time; e.g. if they want the test results of the last (failed) test run)
          But this column is not labeled as 'last passed duration", so it came as surprise.

          Martin Jost added a comment - Our CI team just stumbled across this as well. We know about "Last successful artifacts" and stuff like that. Here it is clearly marked as such (still it is biting some of our users from time to time; e.g. if they want the test results of the last (failed) test run) But this column is not labeled as 'last passed duration", so it came as surprise.

          Martin Jost added a comment -

          I added a "New Feature" request to the "extra-columns-plugin", asking to get a column with the meaning via that route:
          https://issues.jenkins.io/browse/JENKINS-67039

          Martin Jost added a comment - I added a "New Feature" request to the "extra-columns-plugin", asking to get a column with the meaning via that route: https://issues.jenkins.io/browse/JENKINS-67039

            Unassigned Unassigned
            sirscott Scott Sturdivant
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: