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

After Jenkins upgrade Declarative Pipelines stopped working due to JobConfigHistory plugin

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce

    Description

      We recently upgraded our Jenkins instance from 2.204.4 to version 2.297.

      We also upgraded Java from version 8 to 11 (openJDK).

      All plugins were upgraded. (See attached list of installed plugins)

      We've been reported that Declarative pipelines can't be created due to an error (see attached). Existing pipeline jobs are working fine after the upgrade, this problem is only affecting new jobs. If we copy an existing pipeline job, the resulting job is also working fine. Just the ones that are created from scratch are not working.

      We tried the below without success:

      Downgrade the JobConfigHistory plugin to 2.24

      Go back to use Java 8 in the main server and all the nodes.

      This issue only affects to declarative pipelines, scripted ones are working fine.

      We've disabled the plugin and the issue is gone. Our Jenkins instance is not reachable externally.

      Attachments

        Activity

          hugo9995 Hugo created issue -
          saper Marcin Cieślak made changes -
          Field Original Value New Value
          Labels declarative-pipeline jobConfigHistory declarative-pipeline java11-compatibility jobConfigHistory
          saper Marcin Cieślak added a comment - - edited

          Thanks! We are using 2.303 and job config history 2.27 and just migrated to Java 11, but haven't upgraded all plugins yet. I don't see this issue in our declarative pipelines.

          saper Marcin Cieślak added a comment - - edited Thanks! We are using 2.303 and job config history 2.27 and just migrated to Java 11, but haven't upgraded all plugins yet. I don't see this issue in our declarative pipelines.

          Can you try this in the same environment you are running your job:

          $ jshell --add-modules java.xml
          |  Welcome to JShell -- Version 11.0.11
          |  For an introduction type: /help intro
          
          jshell> import javax.xml.transform.TransformerFactory;
          jshell> var tf = TransformerFactory.newInstance();
          var tf = TransformerFactory.newInstance()tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@4cf777e8
          
          saper Marcin Cieślak added a comment - Can you try this in the same environment you are running your job: $ jshell --add-modules java.xml | Welcome to JShell -- Version 11.0.11 | For an introduction type: /help intro jshell> import javax.xml.transform.TransformerFactory; jshell> var tf = TransformerFactory.newInstance(); var tf = TransformerFactory.newInstance()tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@4cf777e8
          hugo9995 Hugo added a comment -

          Hi Marcin, thanks for checking this, I just executed the above and here is the result.

          # jshell --add-modules java.xml
          |  Welcome to JShell -- Version 11
          |  For an introduction type: /help intro
          
          jshell> import javax.xml.transform.TransformerFactory;
          
          jshell> var tf = TransformerFactory.newInstance();
          tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@2ac273d3
          
          jshell> 
          
          hugo9995 Hugo added a comment - Hi Marcin, thanks for checking this, I just executed the above and here is the result. # jshell --add-modules java.xml |  Welcome to JShell -- Version 11 |  For an introduction type: /help intro jshell> import javax.xml.transform.TransformerFactory; jshell> var tf = TransformerFactory.newInstance(); tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@2ac273d3 jshell> 

          The result is nominally good, but still the output looks different - what is your java -version ?

          saper Marcin Cieślak added a comment - The result is nominally good, but still the output looks different - what is your java -version ?
          hugo9995 Hugo added a comment -

          This one

          # java -version
          openjdk version "11" 2018-09-25
          OpenJDK Runtime Environment 18.9 (build 11+28)
          OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
          
          hugo9995 Hugo added a comment - This one # java -version openjdk version "11" 2018-09-25 OpenJDK Runtime Environment 18.9 (build 11+28) OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
          markewaite Mark Waite added a comment -

          hugo9995 that version of OpenJDK 11 is the original JDK 11 release from almost 3 years ago. There have been 12 patch releases since then. You need to upgrade to the current patch release. It is available from Adoptium, from Red Hat, from Amazon (Corretto), and from others.

          markewaite Mark Waite added a comment - hugo9995 that version of OpenJDK 11 is the original JDK 11 release from almost 3 years ago. There have been 12 patch releases since then. You need to upgrade to the current patch release. It is available from Adoptium, from Red Hat, from Amazon (Corretto), and from others.
          hugo9995 Hugo added a comment -

          Hi, I've updated the Java version to use the latest corretto in all main server and nodes.

           

          jshell --add-modules java.xml
          |  Welcome to JShell -- Version 11.0.12
          |  For an introduction type: /help intro
          
          jshell> import javax.xml.transform.TransformerFactory;
          
          jshell> var tf = TransformerFactory.newInstance();
          tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@5f341870
          
          jshell>
          

          version

           

           

          java -version
          openjdk version "11.0.12" 2021-07-20 LTS
          OpenJDK Runtime Environment Corretto-11.0.12.7.1 (build 11.0.12+7-LTS)
          OpenJDK 64-Bit Server VM Corretto-11.0.12.7.1 (build 11.0.12+7-LTS, mixed mode)
          

           

          hugo9995 Hugo added a comment - Hi, I've updated the Java version to use the latest corretto in all main server and nodes.   jshell --add-modules java.xml |  Welcome to JShell -- Version 11.0.12 |  For an introduction type: /help intro jshell> import javax.xml.transform.TransformerFactory; jshell> var tf = TransformerFactory.newInstance(); tf ==> com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl@5f341870 jshell> version     java -version openjdk version "11.0.12" 2021-07-20 LTS OpenJDK Runtime Environment Corretto-11.0.12.7.1 (build 11.0.12+7-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.12.7.1 (build 11.0.12+7-LTS, mixed mode)  
          basil Basil Crow made changes -
          Epic Link JENKINS-67688 [ 214193 ]
          basil Basil Crow made changes -
          Labels declarative-pipeline java11-compatibility jobConfigHistory java11
          basil Basil Crow made changes -
          Assignee Stefan Brausch [ stefanbrausch ]
          basil Basil Crow added a comment -

          hugo9995 Does this issue persist or can this bug be closed? If I do not hear back within the next week or so, I will assume this bug can be closed.

          basil Basil Crow added a comment - hugo9995 Does this issue persist or can this bug be closed? If I do not hear back within the next week or so, I will assume this bug can be closed.
          markewaite Mark Waite added a comment -

          Closing after almost one month without feedback

          markewaite Mark Waite added a comment - Closing after almost one month without feedback
          markewaite Mark Waite made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Closed [ 6 ]

          People

            Unassigned Unassigned
            hugo9995 Hugo
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: