[JIRA] (JENKINS-59704) NoSuchMethodError occoures when promoting a build using parametrized trigger

0 views
Skip to first unread message

patrick.weegen@gmail.com (JIRA)

unread,
Oct 8, 2019, 9:31:03 AM10/8/19
to jenkinsc...@googlegroups.com
Patrick Weegen created an issue
 
Jenkins / Bug JENKINS-59704
NoSuchMethodError occoures when promoting a build using parametrized trigger
Issue Type: Bug Bug
Assignee: Oleg Nenashev
Components: parameterized-trigger-plugin, promoted-builds-plugin
Created: 2019-10-08 13:30
Priority: Blocker Blocker
Reporter: Patrick Weegen

When updating the promoted builds to Version 3.4 an NoSuchMethodError occoures when using a parametrized job for the promotion.

build hudson.plugins.copyartifact.CopyArtifact@7de7a398 SUCCESS
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path '...version.properties'
[EnvInject] - Variables injected successfully.
build org.jenkinsci.plugins.envinject.EnvInjectBuilder@fb74c58 SUCCESS
FATAL: hudson.plugins.promoted_builds.Promotion.getTarget()Lhudson/model/AbstractBuild;
java.lang.NoSuchMethodError: hudson.plugins.promoted_builds.Promotion.getTarget()Lhudson/model/AbstractBuild;
	at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.createUpstreamCause(BuildTriggerConfig.java:530)
	at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.schedule(BuildTriggerConfig.java:550)
	at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.schedule(BlockableBuildTriggerConfig.java:82)
	at hudson.plugins.parameterizedtrigger.BuildTriggerConfig.perform3(BuildTriggerConfig.java:463)
	at hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig.perform3(BlockableBuildTriggerConfig.java:67)
	at hudson.plugins.parameterizedtrigger.TriggerBuilder.perform(TriggerBuilder.java:93)
	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.build(Promotion.java:449)
	at hudson.plugins.promoted_builds.Promotion$RunnerImpl.doRun(Promotion.java:386)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1815)
	at hudson.model.Run.run(Run.java:1769)
	at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:298)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

With the changes of JENKINS-59600 the method getTarget() was renamed to getTargetBuild() but this change was not made in the calling method.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

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

unread,
Oct 8, 2019, 8:33:03 PM10/8/19
to jenkinsc...@googlegroups.com
Oleg Nenashev commented on Bug JENKINS-59704
 
Re: NoSuchMethodError occoures when promoting a build using parametrized trigger

CC Daniel Beck . I will try to act on it tomorrow, will put a warning to the changelog for now

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

unread,
Oct 8, 2019, 8:38:04 PM10/8/19
to jenkinsc...@googlegroups.com

I'd guess our action plan would be to update plugins using the Promoted Builds API directly (to work around StaplerProxy).

Promoted Builds is a classic architecture technical debt, and it is hard to act on it without major rewrite.

 

dbeck@cloudbees.com (JIRA)

unread,
Oct 9, 2019, 5:23:02 AM10/9/19
to jenkinsc...@googlegroups.com

Unfortunate, but ultimately this was a bad decision in Stapler – no such method should have such a generic name. StaplerFallback#getStaplerFallback is fine, but StaplerProxy#getTarget is just stupid.

Alternatively, lower the baseline dependency to 2.138.1 for now, and not generate the magic method? Unsure whether that works, but based on an analysis in a duplicate of the issue I fixed, it might.

Reply all
Reply to author
Forward
0 new messages