Kubernetes plugin breaks build resume on Jenkins restart

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Kubernetes plugin upgrade 1.27.2 breaks the build resume after restart.

       java.lang.IllegalStateException: Not expecting pod template to be null at this point
       	at org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave.getTemplate(KubernetesSlave.java:92)
       	at org.csanchez.jenkins.plugins.kubernetes.pipeline.SecretsMasker$Factory.secretsOf(SecretsMasker.java:144)
       	at org.csanchez.jenkins.plugins.kubernetes.pipeline.SecretsMasker$Factory.get(SecretsMasker.java:122)
       	at org.csanchez.jenkins.plugins.kubernetes.pipeline.SecretsMasker$Factory.get(SecretsMasker.java:94)
       	at org.jenkinsci.plugins.workflow.steps.DynamicContext$Typed.get(DynamicContext.java:94)
       	at org.jenkinsci.plugins.workflow.cps.ContextVariableSet.get(ContextVariableSet.java:138)
       	at org.jenkinsci.plugins.workflow.cps.CpsThread.getContextVariable(CpsThread.java:135)
       	at org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:297)
       	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:67)
       	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.getListener(DefaultStepContext.java:116)
       	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:79)
       	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.makeLauncher(DefaultStepContext.java:149)
       	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:75)
       	at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.launcher(DurableTaskStep.java:484) 

      Maybe is it the same cause as for JENKINS-63925 ?

      Reproduction steps:

      pipeline {
          agent {
              label 'jenkins-jx-base'
          }
          stages {
              stage('Restart Jenkins') {
                  steps {
                      container('jx-base') {
                          script {
                              sh 'kubectl delete pod -l app=jenkins --wait=false'
                          }
                          echo "restart OK"
                      }
                  }
              }
          }
      } 

      Downgrading to 1.27.1.1 fixed the build resume.

      Version 1.27.3 is still broken.

            Assignee:
            Unassigned
            Reporter:
            Julien Carsique
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: