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

Declarative claims "retry(5) { ... }" is invalid

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This is...stupid. For some reason way back in the day, I set things up such that if there's only one unnamed parameter in a step invocation, that step takes a sole required parameter, and that step takes a body closure, we force-override the parameter type for validation purposes to be String. I seriously have no idea why we did that, and as far as I can tell, it does nothing useful, just blocks things like retry(5).

        Attachments

          Issue Links

            Activity

            Show
            abayer Andrew Bayer added a comment - Combined PR for JENKINS-41490 and JENKINS-41491 up at https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/104
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-api/src/main/resources/ast-schema.json
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
            pipeline-model-definition/src/test/resources/json/nestedTreeSteps.json
            pipeline-model-definition/src/test/resources/nestedTreeSteps.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e4aae36cca402d8612e0c69110f9e7a9128f0ffc
            Log:
            [FIXED JENKINS-41490, JENKINS-41491] Tree steps and validation!

            So this started with fixing JENKINS-41490, so that the editor can
            actually do nested tree steps (d'oh), but in the process, I discovered
            a strange decision from waaaaaay back in the day to force validation
            in certain cases to treat the step parameter type as a String, even
            when it wasn't one. That...was bad. So, fixing both those things.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-api/src/main/resources/ast-schema.json pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/json/nestedTreeSteps.json pipeline-model-definition/src/test/resources/nestedTreeSteps.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/e4aae36cca402d8612e0c69110f9e7a9128f0ffc Log: [FIXED JENKINS-41490, JENKINS-41491] Tree steps and validation! So this started with fixing JENKINS-41490 , so that the editor can actually do nested tree steps (d'oh), but in the process, I discovered a strange decision from waaaaaay back in the day to force validation in certain cases to treat the step parameter type as a String, even when it wasn't one. That...was bad. So, fixing both those things.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Andrew Bayer
            Path:
            pipeline-model-api/src/main/resources/ast-schema.json
            pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java
            pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java
            pipeline-model-definition/src/test/resources/json/nestedTreeSteps.json
            pipeline-model-definition/src/test/resources/nestedTreeSteps.groovy
            http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ca9c202861194c80b78dd1f88c013643e524060a
            Log:
            Merge pull request #104 from abayer/jenkins-41490-jenkins-41491

            [FIXED JENKINS-41490, JENKINS-41491] Tree steps and validation!

            Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/3a0ee9510ed4...ca9c20286119

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: pipeline-model-api/src/main/resources/ast-schema.json pipeline-model-definition/src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/validator/ModelValidatorImpl.groovy pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/AbstractModelDefTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/BasicModelDefTest.java pipeline-model-definition/src/test/resources/json/nestedTreeSteps.json pipeline-model-definition/src/test/resources/nestedTreeSteps.groovy http://jenkins-ci.org/commit/pipeline-model-definition-plugin/ca9c202861194c80b78dd1f88c013643e524060a Log: Merge pull request #104 from abayer/jenkins-41490-jenkins-41491 [FIXED JENKINS-41490, JENKINS-41491] Tree steps and validation! Compare: https://github.com/jenkinsci/pipeline-model-definition-plugin/compare/3a0ee9510ed4...ca9c20286119

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                abayer Andrew Bayer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: