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

"Blame Upstream Committers Plugin" malfunctions when job names contain spaces

    Details

    • Similar Issues:

      Description

      To use the Blame Upstream Committers Plugin, I have set up job dependencies between two projects. The upstream project has spaces in its name. When the downstream job fails and wants to mail to the upstream committers, the plugin fails with the following output on the 'Console output' tab of the job.

      Total time: 23 seconds
      Recording fingerprints
      Sending e-mails to: willemv@COMPANY.org
      Upstream projects changes detected. Mailing upstream committers in the following projects:
      ABC - Development
      No such project exist: ABC
      Sending e-mails to: - Development
      ERROR: Invalid Addresses
      javax.mail.SendFailedException: Invalid Addresses;
        nested exception is:
      	com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Bad recipient address syntax
      ;
        nested exception is:
      	com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <Development>: Recipient address rejected: User unknown in local recipient table
      ;
        nested exception is:
      	com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <Development>: Recipient address rejected: User unknown in local recipient table
      
      	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1196)
      	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:584)
      	at javax.mail.Transport.send0(Transport.java:169)
      	at javax.mail.Transport.send(Transport.java:98)
      	at hudson.tasks.MailSender.execute(MailSender.java:108)
      	at hudson.plugins.blame_upstream_commiters.BlameUpstreamCommitersPublisher.perform(BlameUpstreamCommitersPublisher.java:59)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:580)
      	at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:558)
      	at hudson.model.Build$RunnerImpl.cleanUp(Build.java:167)
      	at hudson.model.Run.run(Run.java:1283)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:122)
      Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 501 5.1.3 Bad recipient address syntax
      ;
        nested exception is:
      	com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <Development>: Recipient address rejected: User unknown in local recipient table
      
      	at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:1047)
      	... 14 more
      Caused by: com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <Development>: Recipient address rejected: User unknown in local recipient table
      
      	... 15 more
      Finished: FAILURE
      

      In the hudson logs, there does not seem to be any more information.

        Attachments

        1. blame.patch
          7 kB
          Willem Verstraeten
        2. MailSender.patch
          4 kB
          Willem Verstraeten

          Activity

          Hide
          willemv Willem Verstraeten added a comment -

          Actually seems to be due to the implmentation of MailSender. That class allows for some kind of 'upstream-individuals:<PROJECT NAME>' protocol, but it fails when that project name includes a space.

          Show
          willemv Willem Verstraeten added a comment - Actually seems to be due to the implmentation of MailSender. That class allows for some kind of 'upstream-individuals:<PROJECT NAME>' protocol, but it fails when that project name includes a space.
          Hide
          willemv Willem Verstraeten added a comment -

          A possible solution could be to add a method 'includeUpstreamIndividualsOfProject' or somesuch, instead of trying to hack this into the recipients string. That would also make this functionality of the MailSender more discoverable.

          Show
          willemv Willem Verstraeten added a comment - A possible solution could be to add a method 'includeUpstreamIndividualsOfProject' or somesuch, instead of trying to hack this into the recipients string. That would also make this functionality of the MailSender more discoverable.
          Hide
          willemv Willem Verstraeten added a comment - - edited

          Attaching patches that implement the solution described above

          Show
          willemv Willem Verstraeten added a comment - - edited Attaching patches that implement the solution described above
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : willemv
          Path:
          trunk/hudson/main/core/src/main/java/hudson/tasks/MailSender.java
          http://jenkins-ci.org/commit/34287
          Log:
          JENKINS-7322 Improved API of MailSender so that mailing upstream culprits can be more robust

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : willemv Path: trunk/hudson/main/core/src/main/java/hudson/tasks/MailSender.java http://jenkins-ci.org/commit/34287 Log: JENKINS-7322 Improved API of MailSender so that mailing upstream culprits can be more robust
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : willemv
          Path:
          trunk/hudson/plugins/blame-upstream-commiters/pom.xml
          trunk/hudson/plugins/blame-upstream-commiters/src/main/java/hudson/plugins/blame_upstream_commiters/BlameUpstreamCommitersPublisher.java
          http://jenkins-ci.org/commit/34289
          Log:
          [FIXED JENKINS-7322] now uses the improved MailSender API to mail upstream culprits

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : willemv Path: trunk/hudson/plugins/blame-upstream-commiters/pom.xml trunk/hudson/plugins/blame-upstream-commiters/src/main/java/hudson/plugins/blame_upstream_commiters/BlameUpstreamCommitersPublisher.java http://jenkins-ci.org/commit/34289 Log: [FIXED JENKINS-7322] now uses the improved MailSender API to mail upstream culprits
          Hide
          dogfood dogfood added a comment -

          Integrated in hudson_main_trunk #236
          JENKINS-7322 Improved API of MailSender so that mailing upstream culprits can be more robust

          willemv :
          Files :

          • /trunk/hudson/main/core/src/main/java/hudson/tasks/MailSender.java
          Show
          dogfood dogfood added a comment - Integrated in hudson_main_trunk #236 JENKINS-7322 Improved API of MailSender so that mailing upstream culprits can be more robust willemv : Files : /trunk/hudson/main/core/src/main/java/hudson/tasks/MailSender.java

            People

            • Assignee:
              willemv Willem Verstraeten
              Reporter:
              willemv Willem Verstraeten
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: