[JIRA] [promoted-builds-plugin] (JENKINS-33254) Promoting Builds fail with: FATAL: Illegal choice:

88 views
Skip to first unread message

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 1, 2016, 4:48:02 PM3/1/16
to jenkinsc...@googlegroups.com
Stephen Nichols created an issue
 
Jenkins / Bug JENKINS-33254
Promoting Builds fail with: FATAL: Illegal choice:
Issue Type: Bug Bug
Assignee: Oleg Nenashev
Components: promoted-builds-plugin
Created: 01/Mar/16 9:47 PM
Environment: Jenkins ver. 1.630
promoted builds plugin ver. 2.25
Labels: jenkins plugin exception promoted-builds promoted
Priority: Major Major
Reporter: Stephen Nichols

Promoting a build fails to run the promotion job and returns the error below. I have double checked the parameters for the job and everything seems to be in order. There are 8 parameters on the build. 6 are default values and 2 are selected from parameters dropdown before execution of the promotion. The drop down values are determined by Extensible choice, Global Choice Parameters.

Started by user ***.*****
Building in workspace /usr/share/tomcat7/.jenkins/workspace/svc-auto-build
Promoting svc-auto-build #2637 - master
FATAL: Illegal choice:
java.lang.IllegalArgumentException: Illegal choice:
at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.createValueCommon(ExtensibleChoiceParameterDefinition.java:398)
at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.createValue(ExtensibleChoiceParameterDefinition.java:431)
at jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition.getDefaultParameterValue(ExtensibleChoiceParameterDefinition.java:451)
at hudson.plugins.parameterizedtrigger.DefaultParameterValuesActionsTransform.getDefaultParameters(DefaultParameterValuesActionsTransform.java:28)
at hudson.plugins.parameterizedtrigger.DefaultParameterValuesActionsTransform.transformParametersAction(DefaultParameterValuesActionsTransform.java:15)
at hudson.plugins.parameterizedtrigger.ProjectSpecificParametersActionFactory.getProjectSpecificBuildActions(ProjectSpecificParametersActionFactory.java:33)
at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.getBuildActions(BuildTriggerConfig.java:351)
at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:419)
at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:66)
at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:88)
at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:345)
at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:287)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.Run.run(Run.java:1679)
at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:232)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Finished: FAILURE

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 1, 2016, 4:50:02 PM3/1/16
to jenkinsc...@googlegroups.com
Stephen Nichols updated an issue
Change By: Stephen Nichols
Environment:
Jenkins ver. 1.630
promoted builds plugin ver. 2.25

extensible choice parameter ver 1.3.2

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 1, 2016, 4:50:04 PM3/1/16
to jenkinsc...@googlegroups.com
Stephen Nichols updated an issue
Change By: Stephen Nichols
Component/s: extensible-choice-parameter-plugin

o.v.nenashev@gmail.com (JIRA)

unread,
Mar 2, 2016, 4:02:02 AM3/2/16
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-33254
 
Re: Promoting Builds fail with: FATAL: Illegal choice:

Could you please provide the job configuration file?
It smells like a bug in Extensible Choice Plugin, but I need to confirm it.

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 2, 2016, 12:57:03 PM3/2/16
to jenkinsc...@googlegroups.com

Oleg, Thanks for looking into it.

config.xml is now attached.

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 2, 2016, 12:57:03 PM3/2/16
to jenkinsc...@googlegroups.com

devld@ikedam.jp (JIRA)

unread,
Mar 2, 2016, 6:43:01 PM3/2/16
to jenkinsc...@googlegroups.com
ikedam commented on Bug JENKINS-33254
 
Re: Promoting Builds fail with: FATAL: Illegal choice:

I have ever seen this situation, which turned out caused for broken and inconsistent configurations originally caused for

JENKINS-27505 .
JENKINS-27505 is an issue of Jenkins core, and fixed with Jenkins 1.639.

It happens with a following case:

  • You put an empty value on the top of choices.
  • You select the empty value for the default value. (not with the "<Top Most Value>")
  • You trigger the project automatically (like with SCM polling, or parameterized-trigger plugin).

It happens in this way:

  • When you open the system configuration page, the top empty value is removed for JENKINS-27505 . It can be removed from the configuration unintentionally when you save the system configuration.
  • The project tries to launch with the empty value as it's configured as the default value.
  • Throws an exception as the value isn't listed in choices.

If it is your case:
How to fix:

  • Visit the system configuration page and add the empty value again.

How to prevent reproduction:
A. upgrade your Jenkins to the latest one. I recommend you to install a LTS version.
B. add an empty choice to a place other than the topmost. You can list the same value twice.
C. Make the parameter editable. It prevents exceptions even for values not listed in choices.
.

stephen.p.nichols@objectbrains.com (JIRA)

unread,
Mar 3, 2016, 12:33:02 PM3/3/16
to jenkinsc...@googlegroups.com

adding an empty value to extensible choice options fixed the promotion issue. Thanks for the feedback ikedam.

Is this still considered a bug that could be fixed or should I close this issue?

devld@ikedam.jp (JIRA)

unread,
Mar 3, 2016, 5:48:01 PM3/3/16
to jenkinsc...@googlegroups.com
ikedam commented on Bug JENKINS-33254

it's not a bug of the plugin, but a bug of Jenkins core and fixed with

JENKINS-27505 .
It is an intented behavior to throw an exception when a build tries to use a value not in choices.

devld@ikedam.jp (JIRA)

unread,
Mar 31, 2016, 7:49:02 PM3/31/16
to jenkinsc...@googlegroups.com
ikedam resolved as Won't Fix
 
Change By: ikedam
Status: Open Resolved
Assignee: Oleg Nenashev ikedam
Resolution: Won't Fix
Reply all
Reply to author
Forward
0 new messages