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

Parallel nodes cannot be selected when executing or awaiting input

    XMLWordPrintable

    Details

    • Similar Issues:
    • Sprint:
      Blue Ocean 1.1

      Description

      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?'
                        }
                    )
                  }
              }
          }
      }
      
      
      

        Attachments

          Issue Links

            Activity

            Hide
            michaelneale Michael Neale added a comment - - edited

            Oh, I know how this crept in. 

            You can make this work correctly, but there needs to be a stage before/after the parallel section. Also, it won't work on first run. once things have run once, then it will work in these cases. 

            Show
            michaelneale Michael Neale added a comment - - edited Oh, I know how this crept in.  You can make this work correctly, but there needs to be a stage before/after the parallel section. Also, it won't work on first run. once things have run once, then it will work in these cases. 
            Hide
            michaelneale Michael Neale added a comment -
            Show
            michaelneale Michael Neale added a comment - possibly fix may be this trivial:  https://github.com/jenkinsci/blueocean-plugin/pull/1100
            Hide
            jamesdumay James Dumay added a comment -

            Good news - this fix is landing in Blue Ocean 1.1

            Show
            jamesdumay James Dumay added a comment - Good news - this fix is landing in Blue Ocean 1.1
            Hide
            michaelneale Michael Neale added a comment -

            I'll do a follow up ticket for regression test in future as this has been problematic. 

            Show
            michaelneale Michael Neale added a comment - I'll do a follow up ticket for regression test in future as this has been problematic. 
            Show
            michaelneale Michael Neale added a comment - tests for this:  https://github.com/jenkinsci/blueocean-plugin/pull/1101
            Hide
            brokenmass Marco Massarotto added a comment -

            I'm having this exact issue on blueocean 1.4

            Show
            brokenmass Marco Massarotto added a comment - I'm having this exact issue on blueocean 1.4
            Hide
            michaelneale Michael Neale added a comment -

            Marco Massarotto it is in the 1.4.1 release which is making its way out now

            Show
            michaelneale Michael Neale added a comment - Marco Massarotto it is in the 1.4.1 release which is making its way out now

              People

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

                Dates

                Created:
                Updated:
                Resolved: