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

FlowNode.isRunning is not very useful

    XMLWordPrintable

Details

    Description

      Give following pipeline script, b1 branch finishes immediately and b2 is not completed yet (waiting for input). I determine branch's completion from a branch's end FlowNode and calling FlowNode.isRunning() returns true instead false as its already completed. This makes BlueOcean API returns b1 as running whereas its already been completed.

      node {
          stage("hey") {
              echo "hello from hey"
          }
          
          stage("par") {
              parallel (
                  "b1" : {
                      echo 'hello from b1'
                  },
      
                  "b2" : {
                      def branchInput = input message: 'Please input branch to test against', parameters: [[$class: 'StringParameterDefinition', defaultValue: 'master', description: '', name: 'branch']]
                      echo "BRANCH NAME: ${branchInput}"
                  }             
              )            
          }
             
          stage("ho") {
              echo "hello from ho"
          }
          
      }
      

      Attachments

        Issue Links

          Activity

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/graph/FlowNode.java
            http://jenkins-ci.org/commit/workflow-api-plugin/5deffd7f6f73638576ddcacc2890e8dfd3438408
            Log:
            JENKINS-38223 Introduced FlowNode.isActive.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/graph/FlowNode.java http://jenkins-ci.org/commit/workflow-api-plugin/5deffd7f6f73638576ddcacc2890e8dfd3438408 Log: JENKINS-38223 Introduced FlowNode.isActive.

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            Jenkinsfile
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/graph/FlowNode.java
            src/test/java/org/jenkinsci/plugins/workflow/graph/FlowNodeTest.java
            http://jenkins-ci.org/commit/workflow-api-plugin/63e8ad0c271573f4bebc57fb0776b3fac4fccea9
            Log:
            Merge pull request #45 from jglick/FlowNode.isActive-JENKINS-38223

            JENKINS-38223 Introduced FlowNode.isActive

            Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/55979f5e128b...63e8ad0c2715

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Sam Van Oort Path: Jenkinsfile pom.xml src/main/java/org/jenkinsci/plugins/workflow/graph/FlowNode.java src/test/java/org/jenkinsci/plugins/workflow/graph/FlowNodeTest.java http://jenkins-ci.org/commit/workflow-api-plugin/63e8ad0c271573f4bebc57fb0776b3fac4fccea9 Log: Merge pull request #45 from jglick/FlowNode.isActive- JENKINS-38223 JENKINS-38223 Introduced FlowNode.isActive Compare: https://github.com/jenkinsci/workflow-api-plugin/compare/55979f5e128b...63e8ad0c2715

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/actions/LogActionImpl.java
            http://jenkins-ci.org/commit/workflow-support-plugin/d78f301c4630ad3d9cbd408494ed1ad36e97b132
            Log:
            JENKINS-38223 Using FlowNode.isActive to eliminate the main overhead in JENKINS-45553.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/support/actions/LogActionImpl.java http://jenkins-ci.org/commit/workflow-support-plugin/d78f301c4630ad3d9cbd408494ed1ad36e97b132 Log: JENKINS-38223 Using FlowNode.isActive to eliminate the main overhead in JENKINS-45553 .

            Code changed in jenkins
            User: Sam Van Oort
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/support/actions/LogActionImpl.java
            src/main/java/org/jenkinsci/plugins/workflow/support/visualization/table/FlowGraphTable.java
            src/test/java/org/jenkinsci/plugins/workflow/support/actions/LogActionImplTest.java
            http://jenkins-ci.org/commit/workflow-support-plugin/236f06ca40fc019ca4da2cadb4d0804971faa9db
            Log:
            Merge pull request #38 from jglick/FlowNode.isActive-JENKINS-38223

            JENKINS-38223 Using FlowNode.isActive to improve JENKINS-45553

            Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/01f9538af15c...236f06ca40fc

            scm_issue_link 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/support/actions/LogActionImpl.java src/main/java/org/jenkinsci/plugins/workflow/support/visualization/table/FlowGraphTable.java src/test/java/org/jenkinsci/plugins/workflow/support/actions/LogActionImplTest.java http://jenkins-ci.org/commit/workflow-support-plugin/236f06ca40fc019ca4da2cadb4d0804971faa9db Log: Merge pull request #38 from jglick/FlowNode.isActive- JENKINS-38223 JENKINS-38223 Using FlowNode.isActive to improve JENKINS-45553 Compare: https://github.com/jenkinsci/workflow-support-plugin/compare/01f9538af15c...236f06ca40fc
            svanoort Sam Van Oort added a comment -

            Review finished and released with workflow-api 2.22

            svanoort Sam Van Oort added a comment - Review finished and released with workflow-api 2.22

            People

              jglick Jesse Glick
              vivek Vivek Pandey
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: