Re: skip email on transient build failures

"David J. Biesack" <[email protected]>
Newsgroups gmane.comp.java.cruise-control.user
Message-ID <[email protected]>
> Date: Fri, 13 Aug 2010 12:01:39 -0400
> From: Dan Rollo <[email protected]>
> 
> Hi David,
> 
> Interesting idea. Unfortunately, I'm not sure how you would persist such 
> state as the # of failures across email publishers (because each build 
> creates new objects).

Since CC knows how to not spam on repeat failures, then email
on success, the information must sit somewhere, right?

> I'm sure there's a way, but it doesn't jump out at 
> me...might need some new way to do it.
> 
> If you take a crack at writing a patch to provide this feature, please 
> be sure to create a Jira issue with your patch attached (and of course 
> holler if you get stuck).

Actually, we do have some folks who have dug into CC and patched a few
things, so Maybe I can persuade them to give it a try.

> Another thought: would it be easier to built some kind of retry into the 
> steps with the intermittent failures? eg: retry the repo fetch?

i.e. last night, we had a failure due to the following:

    surefire:test {execution: default-test}
    
    Error occurred during initialization of VM
    Could not reserve enough space for object heap

but the rebuild ran just fine a couple minutes later. Completely unrelated to
Maven repo timeouts. So I'd really have to just build the retry into <maven2> 
to catch all possible problems... but that does not help folks who have
similar problems but don't use <maven2>. I'd rather just rely on the normal CC 
retry (including creating logs showing Failed) and just confine the affect
to <email> (and by extension <htmlemail>).

thanks

> Dan
> 
> Date: Thu, 12 Aug 2010 10:02:04 -0400
> Subject: [Cruisecontrol-user] skip email on transient build failures
> To: [email protected]
> 
> 
> It's not uncommon for our CC builds to fail for transient reasons
> (usually it is timeouts from Maven central repository, despite our use 
> of Artifactory). [...]
> 
> I propose an enhancement to the <email> publisher to only send mail
> on the second consecutive failure. That is, do not email on the first
> failure and if the next build succeeds, do not send a success email.
> Only send mail if a rebuild after failure also fails.
> [...]
>    <ignoreFirst>emailaddress</ignorefirst> (cardinality 0 .. *)

-- 
David J. Biesack, SAS
SAS Campus Dr. Cary, NC 27513
www.sas.com    (919) 531-7771

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.