Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56349

Stash Pull Request Builder can throw in StashBuildTrigger#run

XMLWordPrintable

      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.

            proski Pavel Roskin
            proski Pavel Roskin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: