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

Downstream jobs not associated with upstream parent job properly

      Using the parameterized build trigger and email-ext

      1) Create downstream job that emails the requestor using email-ext
      2) Create upstream [Edit: multi-configuration only!] job that triggers downstream job using a condition to run the parameterized build trigger plugin
      3) Run upstream job: receive null ptr exception when email-ext tries to email requestor.

          [JENKINS-12410] Downstream jobs not associated with upstream parent job properly

          Joel Collins created issue -

          Joel Collins added a comment -

          I realized this issue is actually with parameterized build trigger. It only is visible when the upstream job is a multi-configuration project.

          Joel Collins added a comment - I realized this issue is actually with parameterized build trigger. It only is visible when the upstream job is a multi-configuration project.
          Joel Collins made changes -
          Component/s New: email-ext [ 15538 ]
          Component/s New: parameterized-trigger [ 15592 ]
          Component/s Original: conditional-buildstep [ 15947 ]
          Description Original: Using the parameterized build trigger, email-ext, and conditional-buildstep:

          1) Create downstream job that emails the requestor using email-ext
          2) Create upstream job that triggers downstream job using a condition to run the parameterized build trigger plugin
          3) Run upstream job: receive null ptr exception when email-ext tries to email requestor.

          This same bug used to occur without conditional-buildstep; when using the parameterized build trigger to run a downstream job the parent job would not be filled in properly. In the master branch of parameterized build trigger, this issue is fixed. (In the desciption page, the fix is: "Builds triggered as build steps will now appear as downstream builds. (issue #11082, issue #9263, issue #5184)") However, when you wrap a parameterized build trigger step in a conditional build step, the same issue still occurs where the downstream job does not have a record of which parent job triggered it.
          New: Using the parameterized build trigger and email-ext

          1) Create downstream job that emails the requestor using email-ext
          2) Create upstream [Edit: multi-configuration only!] job that triggers downstream job using a condition to run the parameterized build trigger plugin
          3) Run upstream job: receive null ptr exception when email-ext tries to email requestor.

          Alex Earl added a comment - - edited

          So, this can be closed? Or should it be reassigned to the parameterized build trigger plugin?

          Alex Earl added a comment - - edited So, this can be closed? Or should it be reassigned to the parameterized build trigger plugin?
          Alex Earl made changes -
          Component/s Original: email-ext [ 15538 ]

          Sami Salonen added a comment -

          I have two free-style projects. The upstream project has a manual promotion process that triggers the downstream project. Jenkins default promotion action Build other projects works as expected whereas promotion actions Trigger/call builds on other projects and Trigger parameterized build on other projects by Parameterized Trigger plugin result in the following exception in the downstream project when trying to send an email to requesters. There is no additional info in jenkins log file, it just repeats the stack dump.

          Jenkins 1.480.3, Email-ext 2.28, Parameterized Trigger 2.17

          Email was triggered for: Success
          Sending email for trigger: Success
          NOT overriding default server settings, using Mailer to create session
          messageContentType = text/html; charset=UTF-8
          Adding recipients from recipient list
          Sending to requester
          ERROR: Could not send email as a part of the post-build publishers.
          java.lang.NullPointerException
          	at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:537)
          	at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:304)
          	at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:296)
          	at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:256)
          	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:718)
          	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:693)
          	at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
          	at hudson.model.Run.execute(Run.java:1546)
          	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:237)
          Some error occured trying to send the email...check the Jenkins log
          Finished: SUCCESS
          

          Sami Salonen added a comment - I have two free-style projects. The upstream project has a manual promotion process that triggers the downstream project. Jenkins default promotion action Build other projects works as expected whereas promotion actions Trigger/call builds on other projects and Trigger parameterized build on other projects by Parameterized Trigger plugin result in the following exception in the downstream project when trying to send an email to requesters. There is no additional info in jenkins log file, it just repeats the stack dump. Jenkins 1.480.3, Email-ext 2.28, Parameterized Trigger 2.17 Email was triggered for : Success Sending email for trigger: Success NOT overriding default server settings, using Mailer to create session messageContentType = text/html; charset=UTF-8 Adding recipients from recipient list Sending to requester ERROR: Could not send email as a part of the post-build publishers. java.lang.NullPointerException at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:537) at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:304) at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:296) at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:256) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:718) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:693) at hudson.model.Build$BuildExecution.cleanUp(Build.java:192) at hudson.model.Run.execute(Run.java:1546) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:237) Some error occured trying to send the email...check the Jenkins log Finished: SUCCESS
          Dominik Bartholdi made changes -
          Assignee Original: Dominik Bartholdi [ domi ] New: huybrechts [ huybrechts ]

          ikedam added a comment -
          • Does it always happen?
          • Would you attach build.xml of the build raised the error?

          ikedam added a comment - Does it always happen? Would you attach build.xml of the build raised the error?

          Sami Salonen added a comment -

          The problem used to be permanent in my case. The good news is that I cannot reproduce it anymore. I tried to reproduce it in two different environments without luck:
          Env 1: Jenkins 1.509.4 + Email Extension 2.36 + Parameterized Trigger 2.22
          Env 2: Jenkins 1.532.2 + Email Extension 2.37.2 + Parameterized Trigger 2.22

          I cannot comment on the original problem regarding multi-configuration projects though.

          Sami Salonen added a comment - The problem used to be permanent in my case. The good news is that I cannot reproduce it anymore. I tried to reproduce it in two different environments without luck: Env 1: Jenkins 1.509.4 + Email Extension 2.36 + Parameterized Trigger 2.22 Env 2: Jenkins 1.532.2 + Email Extension 2.37.2 + Parameterized Trigger 2.22 I cannot comment on the original problem regarding multi-configuration projects though.

          ikedam added a comment -

          I could not reproduce the problem, too.
          Jenkins 1.532.1 + Email-ext 2.37.2 + Parameterized-trigger 2.22.

          What I tried:

          • Run parameterized trigger without parameters as a publisher from multi-configuration project, and always send email to requester in the downstream.
          • Run non-blocking parameterized trigger without parameters as a builder from multi-configuration project, and always send email to requester in the downstream.
          • Run blocking parameterized trigger without parameters as a builder from multi-configuration project, and always send email to requester in the downstream.

          I think it is already resolved in some version:

          • There is another ticket JENKINS-12300, which seems same to this and it is reported as resolved (I'm not sure how it is resolved).
          • Current codes of email-ext seems completely different from that of Email-ext 2.28.

          I'll close this ticket as Resolved if there is no new reports in one month.

          ikedam added a comment - I could not reproduce the problem, too. Jenkins 1.532.1 + Email-ext 2.37.2 + Parameterized-trigger 2.22. What I tried: Run parameterized trigger without parameters as a publisher from multi-configuration project, and always send email to requester in the downstream. Run non-blocking parameterized trigger without parameters as a builder from multi-configuration project, and always send email to requester in the downstream. Run blocking parameterized trigger without parameters as a builder from multi-configuration project, and always send email to requester in the downstream. I think it is already resolved in some version: There is another ticket JENKINS-12300 , which seems same to this and it is reported as resolved (I'm not sure how it is resolved). Current codes of email-ext seems completely different from that of Email-ext 2.28. I'll close this ticket as Resolved if there is no new reports in one month.

            huybrechts huybrechts
            joelcollinsdc Joel Collins
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: