Remove the confusing second Rebuild button when Rebuilder plugin can do the job (better)#1766
Remove the confusing second Rebuild button when Rebuilder plugin can do the job (better)#1766jimklimov wants to merge 1 commit into
Conversation
…play is not permitted) only if Rebuilder plugin does not do the same (better) [JENKINS-76292] Also do not show a Rebuild link if it is not enabled generally (permissions, disabled job, etc.) Signed-off-by: Jim Klimov <jimklimov+jenkinsci@gmail.com>
But are these even the same thing? the pipeline "Rebuild" uses the exact same pipeline definition and libraries. |
jglick
left a comment
There was a problem hiding this comment.
checkout scm to produce the same result when replaying a build of a branch project even if the remote head has since moved.
Somehow distinguishing the actions visually would make sense but as written I would not accept this.
|
Wouldn't it be ok to just always show |
From what I gather, Jelly files in both plugins append an URI to
I think not: for one, without the privileges to see/edit the pipeline code, the fallback Rebuild is not really a Replay (as the logic people have associated with the name). Also there is no other page with |
Are you sure This gets me wondering now, actually: can two plugins serve the same URI -- so on controllers without the Rebuilder plugin the And/or if the Rebuilder plugin taps into Jenkins-provided |
|
ReplayAction has a fixed url |
|
And the rebuild behaviour here is closer to a Replay than a Rebuild. The Rebuild plugin behaviour is when parameterized |
|
If that is so, then probably renaming of the link would suffice, e.g. These lines in Jelly led me to believe it calls the |
https://issues.jenkins.io/browse/JENKINS-76292
The PR extends
ReplayAction::isRebuildEnabled()with a check forrebuildplugin availability, and a reflection call to see if itscom.sonyericsson.rebuild.AbstractRebuildAction.isRebuildAvailable()would render the link.In this case, the workflow-cps-plugin should not show a duplicate and potentially inferior (no Parameterized Rebuild concept here) fallback link when Replay is not permitted.
Testing done
Not yet, checking.
Would be visual/interactive on a Jenkins controller with rebuildable pipelines.
Further PRs are welcome to add an automated test case with installed
rebuild(Rebuilder) plugin, but only for some test cases.Submitter checklist