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

retry step is ignored when a timeout happens a timeout

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins core 2.219
      workflow-basic-steps-plugin 2.19

      After upgrade to the latest version of the Jenkins core and workflow-basic-steps-plugin, we have detected that the behavior of the retry + timeout steps changes, the following code before the change was retied 3 times, now the job is aborted in the first timeout so the retry is ignored.

      pipeline {
         agent any
         stages {
            stage('Test timeout') {
               steps {
                  retry(3){
                      timeout(time: 10, unit: 'SECONDS'){
                          sleep 30
                      }
                  }
               }
            }
         }
      }
      

          [JENKINS-61034] retry step is ignored when a timeout happens a timeout

          Ivan Fernandez Calvo created issue -
          Ivan Fernandez Calvo made changes -
          Description Original: After upgrade to the latest version of the Jenkins core and workflow-basic-steps-plugin, we have detected that the behavior of the retry + timeout steps changes, the following code before the change was retied 3 times, now the job is aborted in the first timeout so the retry is ignored.

          ```
          pipeline {
             agent any
             stages {
                stage('Test timeout') {
                   steps {
                      retry(3){
                          timeout(time: 10, unit: 'SECONDS'){
                              sleep 30
                          }
                      }
                   }
                }
             }
          }
          ```
          New: After upgrade to the latest version of the Jenkins core and workflow-basic-steps-plugin, we have detected that the behavior of the retry + timeout steps changes, the following code before the change was retied 3 times, now the job is aborted in the first timeout so the retry is ignored.

          {code}
          pipeline {
             agent any
             stages {
                stage('Test timeout') {
                   steps {
                      retry(3){
                          timeout(time: 10, unit: 'SECONDS'){
                              sleep 30
                          }
                      }
                   }
                }
             }
          }
          {code}

            Unassigned Unassigned
            ifernandezcalvo Ivan Fernandez Calvo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: