[JIRA] [workflow-plugin] (JENKINS-30572) Parallel step snippet generator error

29 views
Skip to first unread message

amuniz@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 10:44:01 AM9/21/15
to jenkinsc...@googlegroups.com
Antonio Muñiz created an issue
 
Jenkins / Bug JENKINS-30572
Parallel step snippet generator error
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 21/Sep/15 2:43 PM
Labels: workflow
Priority: Minor Minor
Reporter: Antonio Muñiz

When trying to generate a parallel step from the snippet generator an exception is thrown:

java.lang.RuntimeException: Failed to instantiate class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep from {"stapler-class":"org.jenkinsci.plugins.workflow.cps.steps.ParallelStep","$class":"org.jenkinsci.plugins.workflow.cps.steps.ParallelStep"}
	at hudson.model.Descriptor.newInstance(Descriptor.java:579)
	at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet(Snippetizer.java:212)

...

Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep
	at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:177)
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

amuniz@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 10:45:01 AM9/21/15
to jenkinsc...@googlegroups.com
Antonio Muñiz updated an issue
Change By: Antonio Muñiz
When trying to generate a parallel step from the snippet generator an exception is thrown:


{code}

java.lang.RuntimeException: Failed to instantiate class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep from {"stapler-class":"org.jenkinsci.plugins.workflow.cps.steps.ParallelStep","$class":"org.jenkinsci.plugins.workflow.cps.steps.ParallelStep"}
at hudson.model.Descriptor.newInstance(Descriptor.java:579)
at org.jenkinsci.plugins.workflow.cps.Snippetizer.doGenerateSnippet(Snippetizer.java:212)

...

Caused by: org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep
at org.kohsuke.stapler.ClassDescriptor.loadConstructorParamNames(ClassDescriptor.java:177)
{code}

jglick@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 4:48:01 PM9/21/15
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-30572
 
Re: Parallel step snippet generator error

The text shown in the Snippet Generator for the parallel step explains the syntax and notes that mechanical generation of snippets is not available in this case. I am not sure what else there is to do. This is a special step in that it is engine-specific and has a syntax outside the normally permitted scope.

amuniz@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 5:06:01 PM9/21/15
to jenkinsc...@googlegroups.com
Antonio Muñiz closed an issue as Won't Fix
 
Change By: Antonio Muñiz
Status: Open Closed
Resolution: Won't Fix

amuniz@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 5:06:02 PM9/21/15
to jenkinsc...@googlegroups.com
Antonio Muñiz commented on Bug JENKINS-30572
 
Re: Parallel step snippet generator error

This is what I see in the snippet generator help text:

(No visual configuration.) Takes a map from branch names to closures 
and an optional argument failFast which will terminate all branches upon a failure in any other branch:

parallel firstBranch: {
    // do something
}, secondBranch: {
    // do something else
},
failFast: true|false

IMO it's not clear that the snippet generator will fail. If this is an accepted behaviour, I will note it clearly in the help text (as I'm currently working on JENKINS-30086).

jglick@cloudbees.com (JIRA)

unread,
Sep 21, 2015, 5:43:01 PM9/21/15
to jenkinsc...@googlegroups.com

No visual configuration.

is what I meant, but yes it could be better explained.

ParallelStep.DescriptorImpl could override newInstance(StaplerRequest, JSONObject) to return some sample ParallelStep with no branches, but this is not very helpful. Might be better for this to throw something (UnsupportedOperationException?) that would be rendered more politely in the result textarea, or even for StepDescriptor to be allowed to state that it has no visual configuration and to simply disable the snippet generation button in that case.

gentoo.integer@gmail.com (JIRA)

unread,
Jul 18, 2016, 6:48:03 AM7/18/16
to jenkinsc...@googlegroups.com

pipeline-syntax/html shows this error instead of documentation.

This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

gentoo.integer@gmail.com (JIRA)

unread,
Jul 18, 2016, 6:48:03 AM7/18/16
to jenkinsc...@googlegroups.com
Kanstantsin Shautsou reopened an issue
 
Change By: Kanstantsin Shautsou
Resolution: Won't Fix
Status: Closed Reopened

jglick@cloudbees.com (JIRA)

unread,
Aug 24, 2016, 9:24:01 AM8/24/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: workflow

jglick@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 2:13:01 PM8/29/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-cps-plugin
Component/s: pipeline

sean@flanigan.org (JIRA)

unread,
Sep 29, 2016, 9:56:01 PM9/29/16
to jenkinsc...@googlegroups.com
Sean Flanigan commented on Bug JENKINS-30572
 
Re: Parallel step snippet generator error

This also affects GDSL files generated by Jenkins:

// Errors on:
// class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep: There's no @DataBoundConstructor on any constructor of class org.jenkinsci.plugins.workflow.cps.steps.ParallelStep

dbeck@cloudbees.com (JIRA)

unread,
Mar 22, 2017, 9:08:01 AM3/22/17
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Apr 26, 2018, 4:09:04 PM4/26/18
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
 
Change By: Jesse Glick
Assignee: Jesse Glick

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 15, 2019, 11:26:04 AM7/15/19
to jenkinsc...@googlegroups.com
Devin Nusbaum commented on Bug JENKINS-30572
 
Re: Parallel step snippet generator error

I filed a PR to fix the GDSL issue here. The snippet generator and automatically generated documentation would not be affected by that PR.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 15, 2019, 11:29:06 AM7/15/19
to jenkinsc...@googlegroups.com

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 15, 2019, 11:29:07 AM7/15/19
to jenkinsc...@googlegroups.com
Devin Nusbaum started work on Bug JENKINS-30572
 
Change By: Devin Nusbaum
Status: Open In Progress

dnusbaum@cloudbees.com (JIRA)

unread,
Jul 15, 2019, 11:29:08 AM7/15/19
to jenkinsc...@googlegroups.com
Devin Nusbaum assigned an issue to Devin Nusbaum
Change By: Devin Nusbaum
Assignee: Devin Nusbaum

dnusbaum@cloudbees.com (JIRA)

unread,
Aug 1, 2019, 4:22:02 PM8/1/19
to jenkinsc...@googlegroups.com
 
Re: Parallel step snippet generator error

Ok, the GDSL issues should be fixed in Pipeline: Groovy Plugin version 2.73. The documentation issues and error when "generate snippet" is clicked still exist, and I'm not sure of a good way to fix them without more special casing for the parallel step. I'm going to move this back to open.

dnusbaum@cloudbees.com (JIRA)

unread,
Aug 1, 2019, 4:23:04 PM8/1/19
to jenkinsc...@googlegroups.com
Devin Nusbaum stopped work on Bug JENKINS-30572
 
Change By: Devin Nusbaum
Status: In Progress Open

dnusbaum@cloudbees.com (JIRA)

unread,
Aug 1, 2019, 4:23:04 PM8/1/19
to jenkinsc...@googlegroups.com
Devin Nusbaum assigned an issue to Unassigned
 
Change By: Devin Nusbaum
Assignee: Devin Nusbaum
Reply all
Reply to author
Forward
0 new messages