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

Git plugin 3.6.4 error with empty author email in GitChangeSet.findOrCreateUser()

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      We have a committer who set his email address to empty for some reason, and now all our builds fail on the project. The stack trace suggests that a patch prior to line 365 of GitChangeSet might fix the problem.

       
      public User findOrCreateUser(String csAuthor, String csAuthorEmail, boolean createAccountBasedOnEmail) {

      User user;

      if (csAuthor == null) {
      return User.getUnknown();
      }

      if (createAccountBasedOnEmail) {
      if (csAuthorEmail == null || "".equals(csAuthorEmail)) { // new code block
      return User.getUnknown();
      }
      user = User.get(csAuthorEmail, false); // line 365

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Fixed in git plugin 3.7.0, released 21 Dec 2017.

          Show
          markewaite Mark Waite added a comment - Fixed in git plugin 3.7.0, released 21 Dec 2017.
          Hide
          markewaite Mark Waite added a comment -

          Will be included in the git plugin 3.7.0 release.

          Show
          markewaite Mark Waite added a comment - Will be included in the git plugin 3.7.0 release.
          Hide
          bjorng Björn Gustafsson added a comment -

          The new plugin build worked!  Thank you so much!

          Show
          bjorng Björn Gustafsson added a comment - The new plugin build worked!  Thank you so much!
          Hide
          bjorng Björn Gustafsson added a comment -

          We will try out the .hpi ASAP.

          Show
          bjorng Björn Gustafsson added a comment - We will try out the .hpi ASAP.
          Hide
          bjorng Björn Gustafsson added a comment -

          Wow, that was fast!  The tests and new code all look good to me, fwiw.

          Show
          bjorng Björn Gustafsson added a comment - Wow, that was fast!  The tests and new code all look good to me, fwiw.
          Hide
          markewaite Mark Waite added a comment - - edited

          Thanks. I've submitted a pull request with tests. Could you review that pull request?

          The pull request also incorporates a proposed change from another pull request.

          A plugin build is available for interactive testing.

          Show
          markewaite Mark Waite added a comment - - edited Thanks. I've submitted a pull request with tests . Could you review that pull request? The pull request also incorporates a proposed change from another pull request . A plugin build is available for interactive testing.
          Hide
          bjorng Björn Gustafsson added a comment -

          Here is the relevant part of the stack trace:

          23:54:35 FATAL: hudson.plugins.active_directory.CacheAuthenticationException: Authentication failed because there was a problem caching user ; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor*23:54:35* java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor*23:54:35* at org.acegisecurity.userdetails.User.<init>(User.java:127)
          ...
          23:54:35 at hudson.model.User.get(User.java:415)
          23:54:35 at hudson.model.User.get(User.java:384)
          23:54:35 at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:365)
          23:54:35 at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:452)
          23:54:35 at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:134)
          23:54:35 at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:341)
          23:54:35 at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)
           

          Show
          bjorng Björn Gustafsson added a comment - Here is the relevant part of the stack trace: 23:54:35 FATAL: hudson.plugins.active_directory.CacheAuthenticationException: Authentication failed because there was a problem caching user ; nested exception is com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor*23:54:35* java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor*23:54:35* at org.acegisecurity.userdetails.User.<init>(User.java:127) ... 23:54:35 at hudson.model.User.get(User.java:415) 23:54:35 at hudson.model.User.get(User.java:384) 23:54:35 at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:365) 23:54:35 at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:452) 23:54:35 at jenkins.scm.RunWithSCM.calculateCulprits(RunWithSCM.java:134) 23:54:35 at hudson.model.AbstractBuild.calculateCulprits(AbstractBuild.java:341) 23:54:35 at jenkins.scm.RunWithSCM.getCulprits(RunWithSCM.java:93)  

            People

            • Assignee:
              Unassigned
              Reporter:
              bjorng Björn Gustafsson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: