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

Plugin isn't pulling the email address of the committer properly

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: bazaar-plugin
    • Labels:
      None
    • Environment:
      Debian 5.0
    • Similar Issues:

      Description

      For users that have the following line in their ~/.bazaar/bazaar.conf file, the email address isn't being grabbed properly:
      email = Joe Bloggs <joe.bloggs@mycompany.com>

      Assuming my domain for email is set to mycompany.com (in Hudson), Hudson tries to email build failure notifications to Joe@mycompany.com instead of joe.bloggs@mycompany.com.

        Attachments

          Issue Links

            Activity

            Hide
            zigarn Alexandre Garnier added a comment -

            Actually, the email address is just ignored (see JENKINS-5421)...
            In subversion-plugin, the way to get the email address seems to use MailAddressResolver, maybe take a look on this to be able to set email address for user.

            BTW, the email address can still be defined in user view after the user creation.

            Show
            zigarn Alexandre Garnier added a comment - Actually, the email address is just ignored (see JENKINS-5421 )... In subversion-plugin, the way to get the email address seems to use MailAddressResolver, maybe take a look on this to be able to set email address for user. BTW, the email address can still be defined in user view after the user creation.
            Hide
            zigarn Alexandre Garnier added a comment -

            I'm trying to do it like in git plugin : https://github.com/hudson/Hudson-GIT-plugin/blob/master/src/main/java/hudson/plugins/git/GitChangeSet.java#L236
            But I don't know how it works because user.getProperty(Mailer.UserProperty.class) seems to never be null (https://github.com/hudson/hudson/blob/master/core/src/main/java/hudson/model/User.java#L140)
            I'll try to take a look on that later.

            Show
            zigarn Alexandre Garnier added a comment - I'm trying to do it like in git plugin : https://github.com/hudson/Hudson-GIT-plugin/blob/master/src/main/java/hudson/plugins/git/GitChangeSet.java#L236 But I don't know how it works because user.getProperty(Mailer.UserProperty.class) seems to never be null ( https://github.com/hudson/hudson/blob/master/core/src/main/java/hudson/model/User.java#L140 ) I'll try to take a look on that later.
            Hide
            chewetson chewetson added a comment -

            I get the same problem, my output at the end of the build is:
            "Failed to send e-mail to Bob because no e-mail address is known, and no default e-mail domain is configured"

            None of the developers get told about the build failures anymore.
            Is there somewhere on the build server I can look to give more information to help debug this problem?

            Show
            chewetson chewetson added a comment - I get the same problem, my output at the end of the build is: "Failed to send e-mail to Bob because no e-mail address is known, and no default e-mail domain is configured" None of the developers get told about the build failures anymore. Is there somewhere on the build server I can look to give more information to help debug this problem?
            Hide
            zigarn Alexandre Garnier added a comment -

            https://github.com/zigarn/bazaar-plugin/commits/fix-hudson-8575 to fix that.

            I tried to use the UserProperty/MailAddressResolver as suggested in MailAddressResolver but UserProperty can't be simply hidden in user view.
            It's nor possible to test the value of Mailer.UserProperty because it falls back on MailAddressResolver which parses changelogs and then can create a StackOverflowError...

            So, my solution is to force the email address only if the user is new.
            To handle old users, you have to manually set their email address.

            Show
            zigarn Alexandre Garnier added a comment - https://github.com/zigarn/bazaar-plugin/commits/fix-hudson-8575 to fix that. I tried to use the UserProperty/MailAddressResolver as suggested in MailAddressResolver but UserProperty can't be simply hidden in user view. It's nor possible to test the value of Mailer.UserProperty because it falls back on MailAddressResolver which parses changelogs and then can create a StackOverflowError ... So, my solution is to force the email address only if the user is new. To handle old users, you have to manually set their email address.

              People

              • Assignee:
                zigarn Alexandre Garnier
                Reporter:
                cpringle cpringle
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: