New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-47780] Rename the symbol for TriggeredBuildSelector to "triggered" (was "upstream") #95
Conversation
…triggered" (was "upstream")
private boolean allowUpstreamDependencies; | ||
|
||
@DataBoundConstructor | ||
public TriggeredBuildSelector() { | ||
this(false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow the test written in #92 didn't failed even with copyArtifacts(projectName: 'copiee', selector: upstream())
, it must have failed as DataBoundConstroctor
with no parameters didn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I would have a slight preference for the symbol triggered
over upstream
for this build selector (since it is more explicit), that is incompatible.
Anyway you should not have to do this. The Javadoc for @Symbol
is explicit that a symbol need merely be unique within a given kind of extension. There should be no conflict between BuildSelector
s and Trigger
s.
So I do not know what problem you are seeing in JENKINS-47780
but this is not the right solution; something else is wrong. Perhaps it is a bug in pipeline-model-definition
; can you reproduce in Scripted Pipeline? CC @abayer
The Declarative issue is fixed in 1.2.3 regardless. |
@abayer Unfortunately, pipeline-model-definition-plugin-1.2.3 doesn't look fix the problem yet.
It looks depend on the internal order of symbols:
|
@ikedam What? Argh! I could have sworn it was fixed! I must have missed some context for narrowing down the symbol scope... |
@ikedam Augh, you're so very right. I verified that validation worked, not that the actual trigger definition worked. facepalm |
The issue is fixed in pipeline-model-definition 1.2.4. Creating a simple |
https://issues.jenkins-ci.org/browse/JENKINS-47780
copyartifact-1.39 introduced symbols for pipelines (#88), but it caused a problem.
copyartifact-1.39 uses "upstream" for
TriggeredBuildSelector
, but "upstream" is already used for the symbol of ReverseBuildTrigger in Jenkins core:https://github.com/jenkinsci/jenkins/blob/jenkins-2.73/core/src/main/java/jenkins/triggers/ReverseBuildTrigger.java#L192
workflow-cps usually decides the actual classes considering their contexts.
For example, when I declare like this,
workflow-cps binds
upstream
toBuildSelector
that is the type of theselector
parameter.But this looks not work for
triggers
.Though apparently this
upstream
should be notBuildSelector
butBuildTrigger
, workflow-cps tries to resolve thisupstream
asReverseBuildTrigger
.Installing copyartifact-1.39 cause
ReverseBuildTrigger
not work for declarative pipelines.This request uses "triggered" instead of "upstream" for
TriggeredBuildSelector
.