-
Bug
-
Resolution: Fixed
-
Major
There is a report in the Wiki about the plugin crashing in StashBuildTrigger#run
https://wiki.jenkins.io/display/JENKINS/Stash+pullrequest+builder+plugin
The documentation for Trigger#run() says:
Maybe run even before start(hudson.model.Item, boolean), prepare for it.
https://javadoc.jenkins.io/hudson/triggers/Trigger.html#run--
We are definitely not prepared. I don't think running start() from run() would be a good idea, but being defensive and avoiding long chains of method calls would help.
While at that, the "Build started" could be really improved, it's probably the only "happy case" INFO message from the plugin, and it's woefully non-informative.
Also, make sure stop() reverts the effects of start() and makes run() fail before start() is run again.
[JENKINS-56349] Stash Pull Request Builder can throw in StashBuildTrigger#run
Description |
Original:
There is a report in the Wiki about the plugin crashing in StashBuildTrigger#run [https://wiki.jenkins.io/display/JENKINS/Stash+pullrequest+builder+plugin] The documentation for Trigger#run() says: {quote}Maybe run even before [{{start(hudson.model.Item, boolean)}}|https://javadoc.jenkins.io/hudson/triggers/Trigger.html#start-J-boolean-], prepare for it. {quote} [https://javadoc.jenkins.io/hudson/triggers/Trigger.html#run--] We are definitely not prepared. I don't think running start() from run() would be a good idea, but being defensive and avoiding long chains of method calls would help. While at that, the "Build started" could be really improved, it's probably the only "happy case" INFO message from the plugin, and it's woefully non-informative. |
New:
There is a report in the Wiki about the plugin crashing in StashBuildTrigger#run [https://wiki.jenkins.io/display/JENKINS/Stash+pullrequest+builder+plugin] The documentation for Trigger#run() says: {quote}Maybe run even before [{{start(hudson.model.Item, boolean)}}|https://javadoc.jenkins.io/hudson/triggers/Trigger.html#start-J-boolean-], prepare for it. {quote} [https://javadoc.jenkins.io/hudson/triggers/Trigger.html#run--] We are definitely not prepared. I don't think running start() from run() would be a good idea, but being defensive and avoiding long chains of method calls would help. While at that, the "Build started" could be really improved, it's probably the only "happy case" INFO message from the plugin, and it's woefully non-informative. Also, make sure stop() reverts the effects of start() and makes run() fail before start() is run again. |
Issue Type | Original: New Feature [ 2 ] | New: Bug [ 1 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Labels | New: NPE stash trigger |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |