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

Pipeline builds do not run after Groovy 2.x upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: pipeline
    • Environment:
      OSX
      JDK 8
      Jenkins 2.0-beta-2 (suggested plugins)
      Pipeline 2.0
    • Similar Issues:

      Description

      Steps to reproduce it:

      1. Install Jenkins 2.0-beta-2.
      2. Restart
      3. Upgrade Pipeline from 1.15 to 2.0 (in my case 2.0 was not propagated to my nearest UC mirror so the install wizard installed 1.15. I manually changed it to: http://ftp.icm.edu.pl/packages/jenkins/updates/current/update-center.json which already contains 2.0 packages). Make sure you mark all Pipeline related plugins (the ones that were aggregated by workflow-aggregator before 2.0) in the Upgrade tab (otherwise you will stay in 1.15 and only the aggregator is updated).
      4. Create a pipeline with the script generated by the sample "Hello World".
      5. Build it.
      6. It hangs before starting any step and the CPS VM thread dump is empty.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Reproducible with

            mvn -f workflow-cps-plugin -Dtest=WorkflowTest\#demo surefire:test -Djenkins.version=…
            

            git bisect points to this commit updating Groovy from 1.x to 2.x.

            Show
            jglick Jesse Glick added a comment - Reproducible with mvn -f workflow-cps-plugin -Dtest=WorkflowTest\#demo surefire:test -Djenkins.version=… git bisect points to this commit updating Groovy from 1.x to 2.x.
            Hide
            jglick Jesse Glick added a comment -

            Seems like the fix of JENKINS-26481 is incompatible with Groovy 2.x Kohsuke Kawaguchi. A hotfix would be to just disable that patch when 2.x is detected, but I would like to fix it to work in either.

            Show
            jglick Jesse Glick added a comment - Seems like the fix of JENKINS-26481 is incompatible with Groovy 2.x Kohsuke Kawaguchi . A hotfix would be to just disable that patch when 2.x is detected, but I would like to fix it to work in either.
            Hide
            jglick Jesse Glick added a comment -

            Confirmed, bisecting with Jenkins 2 against groovy-cps versions points to this commit.

            Show
            jglick Jesse Glick added a comment - Confirmed, bisecting with Jenkins 2 against groovy-cps versions points to this commit .
            Hide
            jglick Jesse Glick added a comment -

            java.lang.ClassNotFoundException: org.codehaus.groovy.reflection.ClassInfo$ClassInfoSet

            Show
            jglick Jesse Glick added a comment - java.lang.ClassNotFoundException: org.codehaus.groovy.reflection.ClassInfo$ClassInfoSet
            Hide
            abayer Andrew Bayer added a comment -

            Do we have a full stacktrace for that?

            Show
            abayer Andrew Bayer added a comment - Do we have a full stacktrace for that?
            Hide
            jglick Jesse Glick added a comment -

            Not hard to fix the error, and thus make most scripts work again. But SerializationTest.eachClosure still fails—meaning the patching is not effective in Groovy 2.

            Show
            jglick Jesse Glick added a comment - Not hard to fix the error, and thus make most scripts work again. But SerializationTest.eachClosure still fails—meaning the patching is not effective in Groovy 2.
            Show
            abayer Andrew Bayer added a comment - Possibly relevant? https://github.com/gperfutils/gprof/commit/a579c5f165ab76ed3dd1aabdefa4611e8154a4ae
            Hide
            abayer Andrew Bayer added a comment -

            Fwiw, the commit that removed it - groovy-core/commit/97d78e9e52deb52c8e66db501ef208f30384d014

            Show
            abayer Andrew Bayer added a comment - Fwiw, the commit that removed it - groovy-core/commit/97d78e9e52deb52c8e66db501ef208f30384d014
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/b5c85d9f1663b1c34c8e56b656fd0e2cee662869
            Log:
            [FIXED JENKINS-34064] Backing out JENKINS-26481 fix since it broke Pipeline in Jenkins 2.x.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/b5c85d9f1663b1c34c8e56b656fd0e2cee662869 Log: [FIXED JENKINS-34064] Backing out JENKINS-26481 fix since it broke Pipeline in Jenkins 2.x.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/ca821248fbc4ec1ebfa00b059eb8162af843df76
            Log:
            Merge pull request #2 from jglick/JENKINS-34064-backout

            JENKINS-34064 Backing out JENKINS-26481 fix

            Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/61fb5860ea27...ca821248fbc4

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/test/java/org/jenkinsci/plugins/workflow/SerializationTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/ca821248fbc4ec1ebfa00b059eb8162af843df76 Log: Merge pull request #2 from jglick/ JENKINS-34064 -backout JENKINS-34064 Backing out JENKINS-26481 fix Compare: https://github.com/jenkinsci/workflow-cps-plugin/compare/61fb5860ea27...ca821248fbc4
            Hide
            jglick Jesse Glick added a comment -

            Hotfix released as 2.1.

            Show
            jglick Jesse Glick added a comment - Hotfix released as 2.1.
            Hide
            jglick Jesse Glick added a comment -

            The regression is fixed; JENKINS-26481 was already open anyway.

            Show
            jglick Jesse Glick added a comment - The regression is fixed; JENKINS-26481 was already open anyway.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
            src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java
            src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition/config.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition/help-script.html
            src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition/config.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/block.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslHelp.groovy
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslReference.groovy
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslReferenceContent.groovy
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/help.html
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/help.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/index.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/sidepanel.jelly
            src/test/java/org/jenkinsci/plugins/workflow/cps/SnippetizerTest.java
            http://jenkins-ci.org/commit/workflow-cps-plugin/272fc16d274522efb08371cc9c7c0f8a1305305d
            Log:
            Merge branch 'master' into JENKINS-34064

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsStepContext.java src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java src/main/java/org/jenkinsci/plugins/workflow/cps/Snippetizer.java src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition/config.jelly src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsFlowDefinition/help-script.html src/main/resources/org/jenkinsci/plugins/workflow/cps/CpsScmFlowDefinition/config.jelly src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/block.jelly src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslHelp.groovy src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslReference.groovy src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/dslReferenceContent.groovy src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/help.html src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/help.jelly src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/index.jelly src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/sidepanel.jelly src/test/java/org/jenkinsci/plugins/workflow/cps/SnippetizerTest.java http://jenkins-ci.org/commit/workflow-cps-plugin/272fc16d274522efb08371cc9c7c0f8a1305305d Log: Merge branch 'master' into JENKINS-34064

              People

              Assignee:
              jglick Jesse Glick
              Reporter:
              amuniz Antonio Muñiz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: