[Buildbot-devel] feature: excluding files/folders from triggering a build

Mark Pauley mpauley at apple.com
Tue May 9 21:59:12 UTC 2006

	So the problem with fileIsImportant is that it still keeps the  
changes around in the "unimportant" changes list.  This sucks because  
for some reason the SVN update step was updating to the highest  
revision of all of the pending changes (important and unimportant),  
and all of the changes were listed in the build when an important  
change finally came through.  In the end it made for a whole lot of  
failed svn updates (as the unimportant change revisions wouldn't make  
sense in the other builders).

I asked brian about this and he recommended just subclassing the  
Scheduler class and overriding the addUnimportantChange method like so:

> RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v
> retrieving revision 1.15
> diff -U5 -r1.15 scheduler.py
> --- buildbot/scheduler.py       12 Mar 2006 11:28:04 -0000      1.15
> +++ buildbot/scheduler.py       4 May 2006 17:34:08 -0000
> @@ -180,10 +180,13 @@
>      def stopService(self):
>          self.stopTimer()
>          return service.MultiService.stopService(self)
> +class OnlyImportantScheduler(Scheduler):
> +    def addUnimportantChange(self, change):
> +        log.msg("%s: change is not important, discarding %s" %  
> (self, change))
>  class AnyBranchScheduler(BaseUpstreamScheduler):
>      """This Scheduler will handle changes on a variety of branches.  
> It will
>      accumulate Changes for each branch separately. It works by  
> creating a
>      separate Scheduler for each new branch it sees."""

So I currently have a slightly hacked buildbot source bucket, but  
everything is honky dory over here.

On May 9, 2006, at 2:43 PM, Shane McDaniel wrote:

> Agreed, the naming is a little obscure.  This is actually how I do  
> multiple projects with only one build master.  I set that param to a  
> method where I pass in the particular build slaves project name, and  
> it looks to see if it's in any of the checked in files to see if it  
> should build.
> This is probably also how I'll end up doing dependency building, ie  
> if project B depends on project A, and A builds, then build B to  
> make sure A did change any interfaces etc.
> Now if only it would do cross project blaming for me too.....
> -shane
> Lieven Govaerts wrote:
>> My search for 'filter' in the documentation didn't return any  
>> results, so I missed that :)
>> So, if I can combine Mark's setup of a fileIsImportant with my  
>> 'excludes matching' I get the same functionality without changing
>> the code, right? I'll go for that then.
>> Mark, which type of general implementation are you thinking about?
>> Lieven.
>>> -----Original Message-----
>>> From: Shane McDaniel [mailto:smcdaniel at languagecomputer.com] Sent:  
>>> dinsdag 9 mei 2006 23:33
>>> To: Mark Pauley
>>> Cc: Lieven Govaerts; buildbot-devel at lists.sourceforge.net
>>> Subject: Re: [Buildbot-devel] feature: excluding files/folders  
>>> from triggering a build
>>> Isn't the fileIsImportant param to Scheduler meant for this?
>>> Mark Pauley wrote:
>>>> I did the exact same thing, by subclassing Scheduler to discard  
>>>> unimportant changes.
>>>> Check out my last reply to the mailing list about this.
>>> I'm starting
>>>> to think that a more general implementation might be the answer...
>>>> In any case, some sort of filter list would be absolutely
>>> useful to me
>>>> as well.
>>>> _Mark
>>>> On May 9, 2006, at 11:48 AM, Lieven Govaerts wrote:
>>>>> Hi,
>>>>> in the Subversion project there are lots of files &
>>> folders that do
>>>>> not contain source code. For instance, there's a www folder that  
>>>>> contains the Subversion webpages, the STATUS file which tracks  
>>>>> revisions to merge etc.
>>>>> I do not want that changes on these files trigger builds,  
>>>>> because that would be a waste of time.
>>>>> Attached patch provides a way to tell a scheduler to
>>> exclude certain
>>>>> files & folders from triggering a build. The patch only  
>>>>> implements this for the AnyBranchScheduler.
>>>>> My master.cfg file contains an example on how to use this feature:
>>>>> http://www.mobsol.be/svn/public/buildbot/trunk/config
>>>>> kind regards,
>>>>> Lieven.
>>>>> feat-excludes.diff
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,  
> security?
> Get stuff done quickly with pre-integrated technology to make your  
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache  
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel

More information about the devel mailing list