Ticket #2543 (new feature)

Opened 8 years ago

Last modified 8 years ago

Provide a buildbot Change Filter

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.5.6
Component: hgutils Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by gracinet) (diff)

It would be useful to implement the same API as buildbot.filter.ChangeFilter within hgutils.

This would allow launching the right build/test according to changes in the repository, in the setup where the buildbot master is notified of changesets in all repositories.

The BUNDLE_SERVER.xml file can be used to change base urls, so that implementing an exact matches on clone locations is enough for the current setup: using a mirror with periodic pull from the reference repos and the changegroup hook from the mirror clones. This setup has several benefits:

  • avoids running hg, mod_wsgi and buildbot with the same python on hg.cps-cms.org
  • allows setting up private buildbots without polluting the reference repository server configuration (hgrc)

Note that the factory static method fromSchedulerConstructorArgs is actually used to provide a default ChangeFilter instance if not fed with an existing filter, in which case it simply returns it. Mentioning this because I thought at first glance one'd need to monkey patch it, and that's not the case...

More implementation details:

  • keep the bundle object or the list of accepted clones URLs cached on the filter itself
  • first check that the change is not about the watched bundle, and invalidate that cache in the latter case
  • obviously, the bundle path and the path to the repo in which it sits have to be given to constructor (in a second iteration, the latter may be deduced by climbing up from the former, as mercurial itself already does)

Change History

comment:1 Changed 8 years ago by gracinet

  • Description modified (diff)
  • Summary changed from Provide a buildot Change Filter to Provide a buildbot Change Filter
Note: See TracTickets for help on using tickets.