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

Execution time of parallel blocks of in-flight jobs wrong

      Desired behaviour

      • Duration should be 20s for the whole pipeline.
      • ed1 node duration should be 20s
      • ed2 node duration should be 10s

      Undesired behaviour

      • Duration should be 20s for the whole pipeline.
      • ed1 node duration should be 20s
      • ed2 node duration should be 10s but is reported as 20s

      Example

      def map = [:]
      
      map['ed1'] = {
          node() {
              sleep 20
          }
      }
      
      map['ed2'] = {
          node() {
              sleep 10
          }
      }
      
      stage('Stage 1') {
          parallel map
      }
      

      Original request
      Hi,

      the execution time of a stage containing two parallel jobs shows, after the first job has finished, only the execution time of the first job, as long as the second job is running.
      After the second job has finished, the displayed time is updated to the right runtime.

      It would be nice if the time could be right during the execution of the job as well.

          [JENKINS-38536] Execution time of parallel blocks of in-flight jobs wrong

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/ForkScanner.java
          src/test/java/org/jenkinsci/plugins/workflow/graphanalysis/ForkScannerTest.java
          http://jenkins-ci.org/commit/workflow-api-plugin/c591aef1002b6fc3a4313e99dc5e2861338250d8
          Log:
          Merge pull request #39 from jenkinsci/fix-bismuth-long-parallelbranch-JENKINS-38536

          Fix finding the last node of a parallel with one long-running step JENKINS-38536

          Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/af2aec2bc46e...c591aef1002b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/graphanalysis/ForkScanner.java src/test/java/org/jenkinsci/plugins/workflow/graphanalysis/ForkScannerTest.java http://jenkins-ci.org/commit/workflow-api-plugin/c591aef1002b6fc3a4313e99dc5e2861338250d8 Log: Merge pull request #39 from jenkinsci/fix-bismuth-long-parallelbranch- JENKINS-38536 Fix finding the last node of a parallel with one long-running step JENKINS-38536 Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/af2aec2bc46e...c591aef1002b

          Code changed in jenkins
          User: Sam Van Oort
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTiming.java
          src/test/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTimingTest.java
          http://jenkins-ci.org/commit/pipeline-graph-analysis-plugin/7d58d361764f8b71c2ca17a22aa560feb31fc6ce
          Log:
          Merge pull request #10 from jenkinsci/verify-timing-for-incomplete-parallels

          Further verify timing for incomplete parallels fix from JENKINS-38536

          Compare: https://github.com/jenkinsci/pipeline-graph-analysis-plugin/compare/63866931892a...7d58d361764f

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTiming.java src/test/java/org/jenkinsci/plugins/workflow/pipelinegraphanalysis/StatusAndTimingTest.java http://jenkins-ci.org/commit/pipeline-graph-analysis-plugin/7d58d361764f8b71c2ca17a22aa560feb31fc6ce Log: Merge pull request #10 from jenkinsci/verify-timing-for-incomplete-parallels Further verify timing for incomplete parallels fix from JENKINS-38536 Compare: https://github.com/jenkinsci/pipeline-graph-analysis-plugin/compare/63866931892a...7d58d361764f

          Sam Van Oort added a comment -

          Finally resolved with workflow-api 2.17 

          jamesdumay   vivek cri

          Sam Van Oort added a comment - Finally resolved with workflow-api 2.17  jamesdumay   vivek   cri

          Sam Van Oort added a comment -

          Closing since the fix has been released

          Sam Van Oort added a comment - Closing since the fix has been released

          James Dumay added a comment -

          svanoort nice one We are going to upgrade to that version for 1.2 in this PR.

          James Dumay added a comment - svanoort nice one We are going to upgrade to that version for 1.2 in this PR .

          James Dumay added a comment -

          svanoort I am going to backport this dependency upgrade to our 1.1 branch so we don't have people confused about it.

          James Dumay added a comment - svanoort I am going to backport this dependency upgrade to our 1.1 branch so we don't have people confused about it.

          Sam Van Oort added a comment -

          Sounds good to me

          Sam Van Oort added a comment - Sounds good to me

          Damien Jiang added a comment -

          This problem seems to be occurring for us on a newer version of Blue Ocean (Jenkins Core 2.73.3, Blue Ocean 1.4.2 + dependencies, Pipeline 2.5, Pipeline: API 2.26).

          We have a parallel step where each of the individual nodes has a clearly different runtime, but Blue Ocean (and the Blue Ocean API) report all the parallel nodes as having roughly the same runtime (+/- a few ms).

          Damien Jiang added a comment - This problem seems to be occurring for us on a newer version of Blue Ocean (Jenkins Core 2.73.3, Blue Ocean 1.4.2 + dependencies, Pipeline 2.5, Pipeline: API 2.26). We have a parallel step where each of the individual nodes has a clearly different runtime, but Blue Ocean (and the Blue Ocean API) report all the parallel nodes as having roughly the same runtime (+/- a few ms).

          Damien Jiang added a comment -

          See above comment; this issue is happening for us on the latest version of Blue Ocean.

          Damien Jiang added a comment - See above comment; this issue is happening for us on the latest version of Blue Ocean.

          Damien Jiang added a comment -

          I created a new ticket to track my issue, which may be different from this one.

          Damien Jiang added a comment - I created a new ticket to track my issue, which may be different from this one.

            svanoort Sam Van Oort
            cri Cornelius Riemenschneider
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: