From: Lalor, Brian Sent: Friday, October 17, 2008 2:32 PM To: users@hudson.dev.java.net Subject: RE: RE: RE: Re: Mail sending not working as expected Yeah, I think that should be compatible. I also think the SVN SCM is broken in this respect. Follow along in your own script console (http://hudson/script). "2008_10" is one of my top-level Maven Builder projects. "fili.cote:negotiator" is one of its sub-modules. > h = hudson.model.Hudson.instance; > rootMod = h.getItemByFullName("2008_10"); // hudson.maven.MavenModuleSet > println("rootMod: " + rootMod); rootMod: hudson.maven.MavenModuleSet@19988c7[2008_10] > lastBuild = rootMod.lastBuild; > println("rootMod.lastBuild: " + lastBuild); rootMod.lastBuild: 2008_10 #53 > println("first affected path of last build: " + lastBuild.changeSet.items[0].affectedPaths[0]); first affected path of last build: /2008_10/trunk/FILI-Java/cote/negotiator/src/test/resources/com > subMod = h.getItemByFullName("2008_10/fili.cote:negotiator"); // hudson.maven.MavenModule > println("subMod: " + subMod); subMod: hudson.maven.MavenModule@11fc4b8[2008_10/fili.cote:negotiator] > println("subMod.relativePath: " + subMod.relativePath); subMod.relativePath: FILI-Java/cote/negotiator So what happens is when you look at a sub-module's list of changes, it tries to match the sub-module's relative path against the affectedPath of the changeset entry. Since the affectedPath doesn't start with the sub-module's relativePath, that changeset entry isn't shown in the sub-module's list of changes. In order for this to work, the SCM module needs to ensure that the affectedPaths have the same directory root as the modules'. I ran into this problem with my own SCM, and apparently the SVN SCM has that issue, too. I still think that if a module fails to build, the list of culprits should fall back to *all* users who made a change that affected the top-level item. I'll open a defect on this. > -----Original Message----- > From: Philippe Laflamme [mailto:twologic@gmail.com] > Sent: Friday, October 17, 2008 12:29 PM > To: users@hudson.dev.java.net > Subject: RE: RE: Re: Mail sending not working as expected > > > Thanks for the information. I'm now pretty sure that the > problem is caused by > the fact that Hudson is not able to link the changes to the > sub-module. To > answer your question directly: no, the sub-module's changes > do NOT show > anything. > > Our code is setup this way (in SVN): > /bar/trunk/pom.xml (contains the module aggregator which is > also the parent > project) > /bar/trunk/bar-module/pom.xml (contains the module) > > The Maven naming scheme is like so: > parent is foo.bar:bar > module is foo.bar:bar-module > > The changelog at the job level shows changes with the following paths: > /bar/trunk/bar-module/src/.../FooBar.java > > The code is checked out at the "trunk" level. So on disk, the > same class' > path is: > ${workspaceRoot}/trunk/bar-module/src/.../FooBar.java > > Is this compatible with Hudson's "culprit finding" behaviour? > > > blalor wrote: > > > > Yeah, it does do more fancy stuff, and I'm on the fence > about whether > > that's a legitimate thing. > > > > So, the list of changes is generated by the SCM plugin for > the project > > as a whole. Whenever a Maven module fails, it attempts to > identify the > > culprits by filtering the changelog down to only the files that are > > relevant to that module. It does this based on the > relative path of the > > module. So if the relative path of module foo.bar:baz is > > foo/bar/baz(/pom.xml), whenever foo.bar:baz fails, Hudson > searches the > > changelog for files whose path starts with "foo/bar/baz"; > if it doesn't > > find anything, no email is sent, even if (I believe) it's a > dependency > > that changed, causing the build to break. (Geez, where's a > whiteboard > > when I need one?) > > > > I think that's a nifty way to try to identify the culprit, > but I also > > think that if the list of culprits is empty, then everyone > who made a > > change that caused the job to kick off again should receive > an email. > > That's not the way it works today. > > > > In your case, Philippe, does the module that *did* change accurately > > reflect the changes at the sub-module level? > > > >> -----Original Message----- > >> From: Philippe Laflamme [mailto:twologic@gmail.com] > >> Sent: Friday, October 17, 2008 10:10 AM > >> To: users@hudson.dev.java.net > >> Subject: RE: Re: Mail sending not working as expected > >> > >> > >> Good point, I should've provided more info on my projects. So > >> here goes. > >> > >> Job type is Maven2 (with 14 modules) > >> SCM is SVN > >> > >> When I intentionally broke the build, I could clearly see my > >> commit comments > >> in the "Recent Changes". This test is no longer available so > >> I can't give > >> you all the details (whether I see the changes in the > broken module). > >> > >> The same build was just broken (for real) and the > situation is a bit > >> different than the test I ran. The committer changed a module > >> that broke > >> another. The "Changes" for the broken module shows "No > >> changes. Changes in > >> dependency" and no email was sent for this broken build. I > >> would think that > >> it's simply a matter of sending an email to whomever shows up > >> in the list of > >> top level changes. Does Hudson do some more fancy stuff? > >> > >> Thanks > >> > >> > >> blalor wrote: > >> > > >> > I was seeing this problem yesterday due to a bug in my PVCS > >> SCM plugin > >> > (which is really due to PVCS being a steaming pile of crap, but I > >> > digress). Which builder type are you using (Maven, > >> Freestyle, &c.)? > >> > Does your changelog identify the culprits for each > sub-module in the > >> > build (if you're using Maven)? eg. for a given build which > >> should have > >> > notified the culprits, what does > >> > http://hudson/job/JOB_ID/BUILD_NUM/changes show? > >> > > >> > I was looking at the source for the mailer yesterday and > >> the logging is > >> > pretty sparse; there's not much you can do to make the > process more > >> > verbose. > >> > > >> >> -----Original Message----- > >> >> From: P. Laflamme [mailto:twologic@gmail.com] > >> >> Sent: Friday, October 17, 2008 9:18 AM > >> >> To: users@hudson.dev.java.net; Kohsuke.Kawaguchi@sun.com > >> >> Subject: Re: Mail sending not working as expected > >> >> > >> >> Sorry for bumping this message, but I still don't see what > >> the problem > >> >> might be. Is there anything else I can active to learn > >> more about the > >> >> emailing procedure? > >> >> > >> >> Thanks! > >> >> Philippe > >> >> > >> >> On Tue, Oct 7, 2008 at 1:04 PM, P. Laflamme > >> >> wrote: > >> >> > Hi, > >> >> > > >> >> > I've added the debug output of the MailSender and here > >> is what was > >> >> > available in the console after intentionally breaking a build: > >> >> > > >> >> > Trying to send e-mails to individuals who broke the build. > >> >> sizeof(culprits)==0 > >> >> > An attempt to send an e-mail to empty list of > >> recipients, ignored. > >> >> > channel stopped > >> >> > > >> >> > The culprits collection should have at least contained > >> on individual > >> >> > (myself) since I'm part of the developers in the list of > >> >> the changes > >> >> > for that build. In the list of changes I can see my > commit and my > >> >> > username. > >> >> > > >> >> > Any ideas? > >> >> > > >> >> > BTW: this is running on 1.252 > >> >> > > >> >> > Cheers, > >> >> > Philippe > >> >> > > >> >> > On Wed, Oct 1, 2008 at 8:31 PM, Kohsuke Kawaguchi > >> >> > wrote: > >> >> >> > >> >> >> Sorry for a delay in the response. > >> >> >> > >> >> >> P. Laflamme wrote: > >> >> >>> > >> >> >>> Hi, > >> >> >>> > >> >> >>> I'm having trouble with the emailing feature in Hudson. I've > >> >> >>> configured a project this way: > >> >> >>> > >> >> >>> X E-mail Notification > >> >> >>> X Send e-mail for every unstable build > >> >> >>> X Send separate e-mails to individuals who broke the build > >> >> >>> > >> >> >>> The recipient list is empty. I've set the emails of > >> the developers > >> >> >>> through the "People" section: I've set the email on > the users > >> >> >>> discovered in SVN by Hudson. > >> >> >>> > >> >> >>> My understanding is that when a build becomes unstable, > >> >> Hudson should > >> >> >>> send an email to the people that are present in the SVN > >> >> changelog of > >> >> >>> this build. Since the recipient list is empty, only these > >> >> people would > >> >> >>> get an email. > >> >> >> > >> >> >> Yes. > >> >> >> > >> >> >>> The behaviour I see is always the same: no email is sent > >> >> and the log > >> >> >>> always shows "An attempt to send an e-mail to empty list of > >> >> >>> recipients, ignored." Sometimes this message is > >> displayed multiple > >> >> >>> times (twice or thrice). If the recipient list is > >> >> non-empty, emails > >> >> >>> are sent. I'd rather have only the people involved be > >> notified... > >> >> >> > >> >> >> Can you go to the scripting console from the "Manage > >> >> Hudson" link and run: > >> >> >> > >> >> >> hudson.tasks.MailSender.debug=true; > >> >> >> > >> >> >> ? > >> >> >> > >> >> >> This should have Hudson print out more details about how > >> >> it decides who to > >> >> >> send e-mails. > >> >> >> > >> >> >>> Also, I have two different Hudson instances installed on > >> >> two different > >> >> >>> servers. Both are installed in Tomcat. Both show the same > >> >> behaviour. > >> >> >>> One uses the Active Directory Plugin, the other does not. > >> >> Still, both > >> >> >>> behave in the exact same way... > >> >> >>> > >> >> >>> Am I misinterpreting the emailing feature or am I missing > >> >> some config > >> >> >>> setting somewhere? > >> >> >>> > >> >> >>> > >> >> > >> > --------------------------------------------------------------------- > >> >> >>> To unsubscribe, e-mail: > users-unsubscribe@hudson.dev.java.net > >> >> >>> For additional commands, e-mail: > users-help@hudson.dev.java.net > >> >> >>> > >> >> >>> > >> >> >> > >> >> >> > >> >> >> -- > >> >> >> Kohsuke Kawaguchi > >> >> >> Sun Microsystems > >> >> http://weblogs.java.net/blog/kohsuke/ > >> >> >> > >> >> > > >> >> > >> >> > >> > --------------------------------------------------------------------- > >> >> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net > >> >> For additional commands, e-mail: users-help@hudson.dev.java.net > >> >> > >> >> > >> >> > >> > > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net > >> > For additional commands, e-mail: users-help@hudson.dev.java.net > >> > > >> > > >> > > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/Mail-sending-not-working-as-expected-tp1 > >> 9678359p20034068.html > >> Sent from the Hudson users mailing list archive at Nabble.com. > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net > >> For additional commands, e-mail: users-help@hudson.dev.java.net > >> > >> > >> > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net > > For additional commands, e-mail: users-help@hudson.dev.java.net > > > > > > > > -- > View this message in context: > http://www.nabble.com/Mail-sending-not-working-as-expected-tp1 > 9678359p20036703.html > Sent from the Hudson users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net > For additional commands, e-mail: users-help@hudson.dev.java.net > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@hudson.dev.java.net For additional commands, e-mail: users-help@hudson.dev.java.net