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

disableConcurrentBuilds() within an options block is now broken, throws Groovy exception during Jenkinsfile parsing

    XMLWordPrintable

Details

    Description

      Options block like this:

      pipeline {
          options {
              disableConcurrentBuilds()
              timeout(time: 30, unit: 'MINUTES')
          }
          (...)
      }

      disableConcurrentBuilds() now throws a Groovy exception at build time when Jenkins tries to compile the Jenkinsfile. Class cast error from @{} to Describable.

      Probably related to this change:

      https://issues.jenkins-ci.org/browse/JENKINS-47781

      Attachments

        Issue Links

          Activity

            Closing this one, as the issue is being resolved. Thank you.

            nrayapati Naresh Rayapati added a comment - Closing this one, as the issue is being resolved. Thank you.

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-definition/pom.xml
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/OptionsTest.java
            pipeline-model-definition/src/test/resources/disableConcurrentBuilds.groovy
            pom.xml
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5a06b265938fcf49030336a0ce7bdbaa39c100ea
            Log:
            [FIXED JENKINS-48115] Work around badly configured metasteps

            jira-steps has `isMetaStep()` returning true for all its step
            descriptors, which is...wrong. As a result, literally every symbol has
            at least one erstwhile metastep, breaking our logic for determining
            whether we're looking at a function or a describable. Sigh. While this
            should be fixed in jira-steps too, we should definitely be working
            around the super-broad cases like this.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-definition/pom.xml pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/ASTParserUtils.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/OptionsTest.java pipeline-model-definition/src/test/resources/disableConcurrentBuilds.groovy pom.xml http://jenkins-ci.org/commit/pipeline-model-definition-plugin/5a06b265938fcf49030336a0ce7bdbaa39c100ea Log: [FIXED JENKINS-48115] Work around badly configured metasteps jira-steps has `isMetaStep()` returning true for all its step descriptors, which is...wrong. As a result, literally every symbol has at least one erstwhile metastep, breaking our logic for determining whether we're looking at a function or a describable. Sigh. While this should be fixed in jira-steps too, we should definitely be working around the super-broad cases like this.

            Things are working again with the latest releases to the plugins. Thanks guys.

            dbsanfte David Sanftenberg added a comment - Things are working again with the latest releases to the plugins. Thanks guys.
            abayer Andrew Bayer added a comment -

            Ok, jira-steps and workflow-step-api fixes released, Declarative picking up that workflow-step-api change will be coming shortly, but isn't actually needed to unbreak things. =)

            abayer Andrew Bayer added a comment - Ok, jira-steps and workflow-step-api fixes released, Declarative picking up that workflow-step-api change will be coming shortly, but isn't actually needed to unbreak things. =)
            nrayapati Naresh Rayapati added a comment - - edited

            dbsanfte
            I have dot released jira-steps 1.3.1 http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/jira-steps/1.3.1/ it should available for consumption soon.

            Thanks for your inputs abayer Sorry for the inconvenience caused if any.

            Have a happy holidays

            nrayapati Naresh Rayapati added a comment - - edited dbsanfte I have dot released jira-steps 1.3.1 http://repo.jenkins-ci.org/releases/org/jenkins-ci/plugins/jira-steps/1.3.1/ it should available for consumption soon. Thanks for your inputs abayer Sorry for the inconvenience caused if any. Have a happy holidays

            People

              abayer Andrew Bayer
              dbsanfte David Sanftenberg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: