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

Stash Pull Request Builder can throw in StashBuildTrigger#run

      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

          Pavel Roskin created issue -
          Pavel Roskin made changes -
          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.
          Pavel Roskin made changes -
          Issue Type Original: New Feature [ 2 ] New: Bug [ 1 ]
          Pavel Roskin made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Pavel Roskin made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Pavel Roskin made changes -
          Labels New: NPE stash trigger
          Pavel Roskin made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]

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

              Created:
              Updated:
              Resolved: