You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-29711] Snippet Generator: missing attribute names in single-entry forms #284
Using the snippet generator for the HTML publisher, the generated code, yields an exception:
hudson.AbortException: Cannot publish the report. Target is not specified
at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
Using the snippet generator for the HTML publisher, the generated code, yields an exception:
hudson.AbortException: Cannot publish the report. Target is not specified
at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:64)
at htmlpublisher.workflow.PublishHTMLStepExecution.run(PublishHTMLStepExecution.java:43)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:40)
I seem to recall something like this affecting ServerEndpointStep/RegistryEndpointStep in docker-workflow: these steps require the parameter name to be specified. The issue here is that there is exactly one (mandatory) parameter, and it is monomorphic. For a polymorphic parameter, this code disambiguates the Map passed by Groovy, deciding whether it is the value of one parameter, or the set of all parameters. Probably that trick just does not work for the monomorphic case, yet Snippetizer assumes that it will. If I am right, either DSL or Snippetizer need to be fixed—preferably the former, so that you can actually use the shorter syntax; but this might be impossible, in which case the latter.
I seem to recall something like this affecting ServerEndpointStep/RegistryEndpointStep in docker-workflow: these steps require the parameter name to be specified. The issue here is that there is exactly one (mandatory) parameter, and it is monomorphic. For a polymorphic parameter, this code disambiguates the Map passed by Groovy, deciding whether it is the value of one parameter, or the set of all parameters. Probably that trick just does not work for the monomorphic case, yet Snippetizer assumes that it will. If I am right, either DSL or Snippetizer need to be fixed—preferably the former, so that you can actually use the shorter syntax; but this might be impossible, in which case the latter.
The issue with properties was similar but not actually the same problem. That was happening because Snippetizer wasn't handling List parameters correctly, failing to put parentheses around the List.
Anyway - end result, monomorphic single parameters are now handled cleanly in DSL - the syntax that Snippetizer has been generating for that case (i.e., publishHtml([reportName : "", ...]) from the description here) is now valid. And Snippetizer now correctly puts parentheses around List parameters when they're the only argument. Phew.
The issue with properties was similar but not actually the same problem. That was happening because Snippetizer wasn't handling List parameters correctly, failing to put parentheses around the List.
Anyway - end result, monomorphic single parameters are now handled cleanly in DSL - the syntax that Snippetizer has been generating for that case (i.e., publishHtml([reportName : "", ...]) from the description here) is now valid. And Snippetizer now correctly puts parentheses around List parameters when they're the only argument. Phew.
Can't do round tripping due to JENKINS-29711, and StepConfigTester
doesn't work due to this being a Pipeline-specific JobProperty, but
the snippet generator test does what's expected.
Can't do round tripping due to JENKINS-29711">JENKINS-29711, and StepConfigTester
doesn't work due to this being a Pipeline-specific JobProperty, but
the snippet generator test does what's expected.
Activity
jenkins-infra-bot commentedon Jul 29, 2015
Remote links associated with this issue:
jenkins-infra-bot commentedon Aug 3, 2015
Raw content of original comment:
I seem to recall something like this affecting ServerEndpointStep/RegistryEndpointStep in docker-workflow: these steps require the parameter name to be specified. The issue here is that there is exactly one (mandatory) parameter, and it is monomorphic. For a polymorphic parameter, this code disambiguates the Map passed by Groovy, deciding whether it is the value of one parameter, or the set of all parameters. Probably that trick just does not work for the monomorphic case, yet Snippetizer assumes that it will. If I am right, either DSL or Snippetizer need to be fixed—preferably the former, so that you can actually use the shorter syntax; but this might be impossible, in which case the latter.
jenkins-infra-bot commentedon Mar 4, 2016
Raw content of original comment:
Reported to affect properties too.
jenkins-infra-bot commentedon Aug 24, 2016
Raw content of original comment:
PR up at jenkinsci/workflow-cps-plugin#49 - still need to add testing for metasteps with monomorphic single parameters, but I'll get that shortly.
jenkins-infra-bot commentedon Aug 26, 2016
Raw content of original comment:
The issue with properties was similar but not actually the same problem. That was happening because Snippetizer wasn't handling List parameters correctly, failing to put parentheses around the List.
Anyway - end result, monomorphic single parameters are now handled cleanly in DSL - the syntax that Snippetizer has been generating for that case (i.e., publishHtml([reportName : "", ...]) from the description here) is now valid. And Snippetizer now correctly puts parentheses around List parameters when they're the only argument. Phew.
jenkins-infra-bot commentedon Aug 28, 2016
Raw content of original comment:
Code changed in jenkins
User: Andrew Bayer
Path:
src/test/java/org/jenkinsci/plugins/workflow/multibranch/JobPropertyStepTest.java
http://jenkins-ci.org/commit/workflow-multibranch-plugin/debde517af80c551a86e17c14f7a6f2eb1ccab83
Log:
JENKINS-37477">
JENKINS-37477Working test for snippet generator for triggers.Can't do round tripping due to JENKINS-29711">
JENKINS-29711, and StepConfigTesterdoesn't work due to this being a Pipeline-specific JobProperty, but
the snippet generator test does what's expected.
jenkins-infra-bot commentedon Aug 28, 2016
Raw content of original comment:
Code changed in jenkins
User: Andrew Bayer
Path:
src/main/java/org/jenkinsci/plugins/workflow/cps/DSL.java
src/test/java/org/jenkinsci/plugins/workflow/DSLTest.java
src/test/java/org/jenkinsci/plugins/workflow/cps/SnippetizerTest.java
src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/MonomorphicData.java
src/test/java/org/jenkinsci/plugins/workflow/testMetaStep/MonomorphicStep.java
http://jenkins-ci.org/commit/workflow-cps-plugin/7857e23bfc9e404063a1e512287a0a735445d318
Log:
[FIXED JENKINS-29711] Handle monomorphic single-parameters to steps.
jenkins-infra-bot commentedon Sep 6, 2016
Raw content of original comment:
Code changed in jenkins
User: Andrew Bayer
Path:
pom.xml
http://jenkins-ci.org/commit/workflow-multibranch-plugin/2516ce8009cadc3cd77e66e1932b5c64ae86e3a1
Log:
We actually do need workflow-cps 2.14 for JENKINS-29711">
JENKINS-29711.jenkins-infra-bot commentedon Oct 31, 2016
Raw content of original comment:
Code changed in jenkins
User: Jesse Glick
Path:
pom.xml
src/main/resources/org/jenkinsci/plugins/docker/workflow/Docker.groovy
http://jenkins-ci.org/commit/docker-workflow-plugin/3ff3b8bfb06d722bc7f470ccf42b1016eb352fbb
Log:
May as well update a bit further and pick up the fix of JENKINS-29711">
JENKINS-29711as well.jenkins-infra-bot commentedon Dec 8, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-34261]jenkins-infra-bot commentedon Dec 8, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-32674]jenkins-infra-bot commentedon Dec 8, 2025
[Original
is_duplicated_byfrom Jira: JENKINS-36173]jenkins-infra-bot commentedon Dec 8, 2025
[Original
relates_tofrom Jira: JENKINS-37477]jenkins-infra-bot commentedon Dec 8, 2025
[Original
relates_tofrom Jira: JENKINS-26126]jenkins-infra-bot commentedon Dec 8, 2025
[Original
relates_tofrom Jira: JENKINS-26343]jenkins-infra-bot commentedon Dec 8, 2025
[Original
epicfrom Jira: JENKINS-35393]