[JIRA] (JENKINS-41491) Declarative claims "retry(5) { ... }" is invalid

2 views
Skip to first unread message

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:31:01 PM1/26/17
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
 
Jenkins / Bug JENKINS-41491
Declarative claims "retry(5) { ... }" is invalid
Change By: Andrew Bayer
Priority: Critical Blocker
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:31:01 PM1/26/17
to jenkinsc...@googlegroups.com
Andrew Bayer updated an issue
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) { ... }} } .

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:31:02 PM1/26/17
to jenkinsc...@googlegroups.com
Andrew Bayer created an issue
Issue Type: Bug Bug
Assignee: Andrew Bayer
Components: pipeline-model-definition-plugin
Created: 2017/Jan/26 8:30 PM
Priority: Critical Critical
Reporter: Andrew Bayer

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)

{ ... }

}}.

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:36:02 PM1/26/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:36:02 PM1/26/17
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-41491
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Jan 26, 2017, 3:36:02 PM1/26/17
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Jan 27, 2017, 11:56:02 AM1/27/17
to jenkinsc...@googlegroups.com
Change By: Andrew Bayer
Status: In Review Resolved
Resolution: Fixed

scm_issue_link@java.net (JIRA)

unread,
Jan 27, 2017, 11:56:03 AM1/27/17
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Bug JENKINS-41491
 
Re: Declarative claims "retry(5) { ... }" is invalid

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.

scm_issue_link@java.net (JIRA)

unread,
Jan 27, 2017, 11:57:01 AM1/27/17
to jenkinsc...@googlegroups.com

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!

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:25:21 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages