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

Parallel nodes for scripted pipelines cannot be clicked

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Component/s: blueocean-plugin
    • Environment:
      Jenkins version 2.46.1, Blue Origin 1.0.1,
      Chrome 58.0.3029.96, Safari 10.1

      Jenkins is installed via yum on a CentOS machine and is not using a reverse proxy.
    • Similar Issues:
    • Sprint:
      Blue Ocean 1.1

      Description

      Problem

      • Parallel nodes defined within a script block cannot be selected while running
      • Parallel nodes defined in Pipeline script cannot be selected

      Notes

      • Parallel nodes for declarative are NOT broken
      • Verified on 1.1-beta2 as well as 1.0.1

      Screencast

       

      To reproduce, run one of the scripts below as a non multibranch pipeline - note that you can't click on an in progress branch. 

      I have tested with the following combinations and all of them had this problem

      Jenkins using script syntax and non-dynamic parallel

      node {
          stage("Build/Test") {
              parallel(
                "b1": {
                  sh 'ping -c 5 localhost'
                },
                "b2": {
                  sh 'ping -c 10 localhost'
                },
                "b3": {
                  sh 'ping -c 20 localhost'
                }
              )
          }
      }
      

      Jenkinsfile using script syntax and dynamic parallel

      node {
          stage("Build/Test") {
              def builds = [:]
      
              for (def option in ["one", "two"]) {
                      def node_name = ""
                      if ("one" == "${option}") {
                          node_name = "node001"
                      } else {
                          node_name = "node002"
                      }
                      
                      def option_inside = "${option}"
                      
                      builds["${node_name} ${option_inside}"] = {
                          node {
                              stage("Build Test ${node_name} ${option_inside}") {
                                  sh 'ping -c 10 localhost'
                              }
                          }
                      }
              }
              parallel builds
          }
      }
      

      Jenkinsfile using script syntax without inner stages

      node {
          stage("Build/Test") {
              def builds = [:]
      
              for (def option in ["one", "two"]) {
                      def node_name = ""
                      if ("one" == "${option}") {
                          node_name = "node001"
                      } else {
                          node_name = "node002"
                      }
                      
                      def option_inside = "${option}"
                      
                      builds["${node_name} ${option_inside}"] = {
                          node {
                              sh 'ping -c 10 localhost'
                          }
                      }
              }
              parallel builds
          }
      }
      

      Declarative Jenkinsfile using script block

      pipeline {
          agent none
          stages {
              stage("Build/Test") {
                  steps {
                      script {
                        def builds = [:]
      
                        for (def option in ["one", "two"]) {
                                def node_name = ""
                                if ("one" == "${option}") {
                                    node_name = "node001"
                                } else {
                                    node_name = "node002"
                                }
                                
                                def option_inside = "${option}"
                                
                                builds["${node_name} ${option_inside}"] = {
                                    node {
                                        stage("Build Test ${node_name} ${option_inside}") {
                                            sh 'ping -c 10 localhost'
                                        }
                                    }
                                }
                        }
                        parallel builds
                      }
                  }
              }
          }
      }
      

        Attachments

          Issue Links

            Activity

            Hide
            wbland Wesley Bland added a comment -

            BTW, I verified that this doesn't change by switching to other browsers either on MacOS or Windows. So it doesn't appear to be a browser problem.

            Show
            wbland Wesley Bland added a comment - BTW, I verified that this doesn't change by switching to other browsers either on MacOS or Windows. So it doesn't appear to be a browser problem.
            Hide
            jamesdumay James Dumay added a comment -

            Wesley Bland we've fix a lot of these problems in Blue Ocean 1.1-beta2 which is available from the experimental update center. The running Pipeline has been completely reworked so there are less papercuts.

            Would you be able to give 1.1-beta2 a try and let us know if that fixes things for you?

            Show
            jamesdumay James Dumay added a comment - Wesley Bland we've fix a lot of these problems in Blue Ocean 1.1-beta2 which is available from the experimental update center . The running Pipeline has been completely reworked so there are less papercuts. Would you be able to give 1.1-beta2 a try and let us know if that fixes things for you?
            Hide
            jamesdumay James Dumay added a comment -

            Assigning to myself for investigation

            Show
            jamesdumay James Dumay added a comment - Assigning to myself for investigation
            Hide
            wbland Wesley Bland added a comment -

            It doesn't seem to solve the problem. Strangely, it works for the jobs on the left, which are more traditional stages that look like this:

            def setup(Map args) {
                node("${args.nodeName}") {
                    stage("Setup ${args.nodeName}") {
                        checkout([$class: 'GitSCM', branches: ...snip... ])
                        sh "./autogen.sh --with-autotools=$HOME/software/autotools/bin | tee a.txt"
                        sh "tar --exclude tarball.tar.bz2 -cjf tarball.tar.bz2 *"
                        archiveArtifacts artifacts: "a-${args.nodeName}.txt"
                        stash includes: 'tarball.tar.bz2', name: "${args.nodeName}-tarball"
                    }
                }
            }
            
            ...snip...
                    stage("Setup") {
                        steps {
                            parallel (
                                "angpc01": {
                                    echo "Setup"
                                    setup nodeName: "angpc01"
                                },
                                "ancc01": {
                                    echo "Setup"
                                    setup nodeName: "ancc01"
                                }
                            )
                        }
                    }
            

            The problems come up when I get to the jobs buried in the script in the original post. It does however autoscroll to the bottom of the console output every time the output is updated now, which is a little annoying.

            Show
            wbland Wesley Bland added a comment - It doesn't seem to solve the problem. Strangely, it works for the jobs on the left, which are more traditional stages that look like this: def setup(Map args) { node("${args.nodeName}") { stage("Setup ${args.nodeName}") { checkout([$class: 'GitSCM', branches: ...snip... ]) sh "./autogen.sh --with-autotools=$HOME/software/autotools/bin | tee a.txt" sh "tar --exclude tarball.tar.bz2 -cjf tarball.tar.bz2 *" archiveArtifacts artifacts: "a-${args.nodeName}.txt" stash includes: 'tarball.tar.bz2', name: "${args.nodeName}-tarball" } } } ...snip... stage("Setup") { steps { parallel ( "angpc01": { echo "Setup" setup nodeName: "angpc01" }, "ancc01": { echo "Setup" setup nodeName: "ancc01" } ) } } The problems come up when I get to the jobs buried in the script in the original post. It does however autoscroll to the bottom of the console output every time the output is updated now, which is a little annoying.
            Hide
            jamesdumay James Dumay added a comment -

            Wesley Bland thanks I was able to confirm this bug on 1.1-beta2.

            Show
            jamesdumay James Dumay added a comment - Wesley Bland thanks I was able to confirm this bug on 1.1-beta2.
            Hide
            michaelneale Michael Neale added a comment -

            Quite confused, need to clean this ticket up a bit with a canonical example of what doesn't work with the script. 

            Show
            michaelneale Michael Neale added a comment - Quite confused, need to clean this ticket up a bit with a canonical example of what doesn't work with the script. 
            Hide
            michaelneale Michael Neale added a comment -

            I am closing this one as the duplicate of the other one - which has a but more clarify/triaging, but I am pretty sure it is the same thing. Will be worked on next. 

            Show
            michaelneale Michael Neale added a comment - I am closing this one as the duplicate of the other one - which has a but more clarify/triaging, but I am pretty sure it is the same thing. Will be worked on next. 
            Hide
            jamesdumay James Dumay added a comment -

            Wesley Bland good news - we fixed this issue completely as part of JENKINS-44530. That means a fix will be shipped in Blue Ocean 1.1 soon

            Show
            jamesdumay James Dumay added a comment - Wesley Bland good news - we fixed this issue completely as part of JENKINS-44530 . That means a fix will be shipped in Blue Ocean 1.1 soon

              People

              • Assignee:
                Unassigned
                Reporter:
                wbland Wesley Bland
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: