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

List of possible culprits for repeated failed builds should be cumulative

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • mailer-plugin
    • None
    • Platform: All, OS: All

      Currently when a build fails, Hudson just sends mail (if so configured) to those
      who committed changes to the build. In fact it ought to send mail to everyone
      who committed to any immediately preceding failed builds, i.e. accumulate
      recipients until the breakage is fixed. This is because the usual case is that a
      commit in the first broken build has not been fixed several builds later;
      occasionally someone else introduces an unrelated problem. Continuing to notify
      the original culprit keeps pressure on them, and helps other committers to see
      that they are not necessarily at fault.

          [JENKINS-747] List of possible culprits for repeated failed builds should be cumulative

          jbq added a comment - For reference: http://www.nabble.com/Cumulative-notifications-tf4205241.html#a11961772 and http://www.nabble.com/notifier-list-does-not-include-ALL-commiters-that-have-broken-the-build-tf4317629.html#a12295901

          jbq added a comment -

          Created an attachment (id=87)
          Proposed patch for implementing cumulative notifications, please review as I'm pretty young on the project

          jbq added a comment - Created an attachment (id=87) Proposed patch for implementing cumulative notifications, please review as I'm pretty young on the project

          Jesse Glick added a comment -

          I guess culprits could more simply be a Set<User>. Then you would just write:

          for (Entry change : build.getChangeSet()) {
          build.getProject().culprits.add(change.getAuthor());
          }
          for (User a : build.getProject().culprits) {
          String adrs = ....
          }

          Jesse Glick added a comment - I guess culprits could more simply be a Set<User>. Then you would just write: for (Entry change : build.getChangeSet()) { build.getProject().culprits.add(change.getAuthor()); } for (User a : build.getProject().culprits) { String adrs = .... }

          jbq added a comment -

          Thanks for your feedback Mr Glick

          jbq added a comment - Thanks for your feedback Mr Glick

          Jesse Glick added a comment -

          BTW it is nice to paste the CVS commit log into an issue when closing - makes it
          easier to track. cvsps to the rescue:

          PatchSet 3705
          Date: 2007/09/06 12:12:40
          Author: jbq
          Branch: HEAD
          Tag: (none)
          Log:
          Issue number: 747

          List of possible culprits for repeated failed builds should be cumulative

          Members:
          extras/tester/src/test/java/hudson/model/FreeStyleProjectTest.java:1.4->1.5
          main/core/src/main/java/hudson/model/AbstractProject.java:1.55->1.56
          main/core/src/main/java/hudson/tasks/MailSender.java:1.9->1.10

          Jesse Glick added a comment - BTW it is nice to paste the CVS commit log into an issue when closing - makes it easier to track. cvsps to the rescue: PatchSet 3705 Date: 2007/09/06 12:12:40 Author: jbq Branch: HEAD Tag: (none) Log: Issue number: 747 List of possible culprits for repeated failed builds should be cumulative Members: extras/tester/src/test/java/hudson/model/FreeStyleProjectTest.java:1.4->1.5 main/core/src/main/java/hudson/model/AbstractProject.java:1.55->1.56 main/core/src/main/java/hudson/tasks/MailSender.java:1.9->1.10

          jbq added a comment -

          I get this error:

          FATAL: null
          java.lang.NullPointerException
          at hudson.tasks.MailSender.createEmptyMail(MailSender.java:258)
          at hudson.tasks.MailSender.createFailureMail(MailSender.java:145)
          at hudson.tasks.MailSender.getMail(MailSender.java:86)
          at hudson.tasks.MailSender.execute(MailSender.java:63)
          at hudson.tasks.Mailer._perform(Mailer.java:73)
          at hudson.tasks.Mailer.perform(Mailer.java:67)
          at hudson.model.Build$RunnerImpl.post(Build.java:142)
          at hudson.model.Run.run(Run.java:591)
          at hudson.model.Build.run(Build.java:107)
          at hudson.model.ResourceController.execute(ResourceController.java:66)
          at hudson.model.Executor.run(Executor.java:59)

          jbq added a comment - I get this error: FATAL: null java.lang.NullPointerException at hudson.tasks.MailSender.createEmptyMail(MailSender.java:258) at hudson.tasks.MailSender.createFailureMail(MailSender.java:145) at hudson.tasks.MailSender.getMail(MailSender.java:86) at hudson.tasks.MailSender.execute(MailSender.java:63) at hudson.tasks.Mailer._perform(Mailer.java:73) at hudson.tasks.Mailer.perform(Mailer.java:67) at hudson.model.Build$RunnerImpl.post(Build.java:142) at hudson.model.Run.run(Run.java:591) at hudson.model.Build.run(Build.java:107) at hudson.model.ResourceController.execute(ResourceController.java:66) at hudson.model.Executor.run(Executor.java:59)

          jbq added a comment -

          Changing project configuration was resetting the 'culprits' field to null

          jbq added a comment - Changing project configuration was resetting the 'culprits' field to null

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: