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

Are you sure you want to abort null?

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      I'm using a jenkins declarative pipeline:

       

      pipeline {
      agent {
      label "pipeline"
      }
      
      parameters {
      booleanParam(defaultValue: false, description: 'Bump', name: 'shouldBump')
      }
      
      options {
      ansiColor('xterm')
      }
      
      stages {
      stage ("Checkout") {
      steps {
      echo("STAGE_NAME is ${STAGE_NAME} -- Checkout")
      input message: 'Checkout'
      }
      }
      
      stage("Compile") {
      parallel {
      stage("Code") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Compile:Code")
      input message: 'Compile:Code'
      }
      }
      stage("Frontend") {
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Compile:Frontend")
      input message: 'Compile:Frontend'
      }
      }
      }
      }
      
      stage("Tests") {
      parallel {
      stage("Domain") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Tests:Domain")
      input message: 'Tests:Domain'
      }
      }
      
      stage("Backend") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Tests:Backend")
      input message: 'Tests:Backend'
      }
      }
      
      stage("Client") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Tests:Client")
      input message: 'Tests:Client'
      }
      }
      
      stage("Jobs") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Tests:Jobs")
      input message: 'Tests:Jobs'
      }
      }
      
      stage("Frontend") {
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Tests:Frontend")
      input message: 'Tests:Frontend'
      }
      }
      }
      }
      
      stage("Publish") {
      parallel {
      stage("Domain") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Publish:Domain")
      input message: 'Publish:Domain'
      }
      }
      stage("Backend") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Publish:Backend")
      input message: 'Publish:Backend'
      }
      }
      stage("Client") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Publish:Client")
      input message: 'Publish:Client'
      }
      }
      stage("Jobs") {
      agent {
      label "pipeline"
      }
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Publish:Jobs")
      input message: 'Publish:Jobs'
      }
      }
      
      stage("Frontend") {
      steps {
      sh 'printenv'
      echo("STAGE_NAME is ${STAGE_NAME} -- Publish:Frontend")
      input message: 'Publish:Frontend'
      }
      }
      }
      }
      }
      }

      Run the job.

      Look at the build executor status.

      Click the [x]

      See an alert: Are you sure you want to abort null?

      Expected results: not null.

        Attachments

          Activity

          Hide
          jsoref Josh Soref added a comment -

          Note: this appears to be possible if AbstractQueueTaskTest.getFullDisplayName is called.

          Looking at various code blobs, it's unclear to me that https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/test/java/hudson/model/queue/AbstractQueueTaskTest.java#L60 is helpful...

          Code generally seems to assume that the function doesn't return null, as in:

          https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/java/hudson/model/AbstractItem.java#L472

          The alert is coming from here:

          https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/resources/lib/hudson/buildCaption.jelly#L40

          It's possible to change the jelly-js to handle null, but I'm not sure that's really the way to go...

          https://github.com/jenkinsci/jenkins/blob/63fa1785ebe22dcf4e62957566a5fa0587ad9ddc/core/src/main/java/jenkins/model/Jenkins.java#L1671

          Note: in a similar context, getFullDisplayName returns "" instead. I understand it's probably not an associated function, but, it seems worth considering...

           

          Show
          jsoref Josh Soref added a comment - Note: this appears to be possible if AbstractQueueTaskTest.getFullDisplayName is called. Looking at various code blobs, it's unclear to me that https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/test/java/hudson/model/queue/AbstractQueueTaskTest.java#L60  is helpful... Code generally seems to assume that the function doesn't return null, as in: https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/java/hudson/model/AbstractItem.java#L472 The alert is coming from here: https://github.com/jenkinsci/jenkins/blob/d4737b2b60438ce0e3cb7a8a6f26675f7c880914/core/src/main/resources/lib/hudson/buildCaption.jelly#L40 It's possible to change the jelly-js to handle null, but I'm not sure that's really the way to go... https://github.com/jenkinsci/jenkins/blob/63fa1785ebe22dcf4e62957566a5fa0587ad9ddc/core/src/main/java/jenkins/model/Jenkins.java#L1671 Note: in a similar context, getFullDisplayName returns "" instead. I understand it's probably not an associated function, but, it seems worth considering...  

            People

            • Assignee:
              Unassigned
              Reporter:
              jsoref Josh Soref
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: