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

Parallel nodes cannot be selected when executing or awaiting input

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • blueocean-plugin
    • None
    • Blue Ocean 1.1

      Problem
      Parallel nodes that are executing or paused for input cannot be selected, if there are no stages either side of the parallel statement, OR it is the first time it has run. 

      To reproduce
      Use any of the examples below and try to click on the parallel branches before execution has completed. You should not be able to select the second or third parallel branches.

       

      Note that in the console you will see a warning of: 

      [mobx.array] Attempt to read an array index (0) that is out of bounds (0). Please check length first. Out of bound indices will not be tracked by MobX

       

      In scope: 

      • A fix. 
      • An ATH test to cover this (perhaps use input scenario)
      • also check that this fixes it for scripts as well as declarative. 
      • Notes
        This is busted on both 1.0.1 and master c2960b2213551513c0b6875d8ed4cbd46c4c6dec

      Example 1 – executing parallels cannot be selected
      Screencast

      Jenkinsfile

      pipeline {
          agent { label any }
          stages {
              stage ('something') {
                  steps {
                    parallel(
                        'branch1': {
                            sh 'ping -c 50 localhost'
                        },
                        'branch2': {
                            sh 'ping -c 20 localhost'
                        },
                        'branch3': {
                            sh 'ping -c 30 localhost'
                        }
                    )
                  }
              }
          }
      }
      

      Non declarative variant: 

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

       

      Example 2 – paused for input parallels cannot be selected
      Screencast

      Jenkinsfile

      pipeline {
          agent { label any }
          stages {
              stage ('something') {
                  steps {
                    parallel(
                        'branch1': {
                            input 'r u ok?'
                        },
                        'branch2': {
                            input 'r u ok?'
                        },
                        'branch3': {
                            input 'r u ok?'
                        }
                    )
                  }
              }
          }
      }
      
      
      

            Unassigned Unassigned
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: