[Buildbot-commits] [Buildbot] #385: SVNPoller transform_path AssertionError when change includes modifications to files inside and outside the svnurl

Buildbot trac trac at buildbot.net
Fri Jan 10 09:40:11 UTC 2014


#385: SVNPoller transform_path AssertionError when change includes modifications
to files inside and outside the svnurl
----------------------+---------------------
Reporter:  mmacvicar  |       Owner:
    Type:  defect     |      Status:  closed
Priority:  minor      |   Milestone:  0.8.8
 Version:  0.7.9      |  Resolution:  fixed
Keywords:  svn        |
----------------------+---------------------

Comment (by tallfurryman):

 Hello,

 Sorry to "revive" that thread, but we have a puzzling effect on our
 master.

 {{{
 $ buildbot --version
 Buildbot version: 0.8.7p1
 Twisted version: 12.3.0
 }}}

 The code repository has a trunk, and some local externals, thus the master
 is configured with:

 {{{
 project root (checked out):
 http://svn.local.lan/svn2/platform_1/product/middleware/branches/mw_v2_ref/mwv2r_hdsat
 change source 1: project_root,
 change source 2: 'http://svn.local.lan/svn2/platform_1/ref_sources',
 change source 3: 'http://svn.local.lan/svn2/sources/tools',
 change source 4:
 'http://svn.local.lan/svn2/platform_1/vendors/ngr/ckernel/V7',
 change source 5: 'http://svn.local.lan/svn2/platform_1/vendors/stu/osp',
 }}}

 And a "{{{svn info --xml}}}" at the root of the slave's svn working copy
 returns:

 {{{
 $ svn info --xml
 (...)
 <root>http://svn.local.lan/svn2</root>
 (...)
 }}}

 Our problem is that when a commit arrives with one element under the
 project root and another outside, in an external...

 {{{
 Revision: 18152
 Author: someone
 Date: vendredi 3 janvier 2014 10:27:48
 Message:
 [Buildbot] test poller with a root modified file and an external file
 ----
 Modified :
 /platform_1/product/middleware/branches/mw_v2_ref/mwv2r_hdsat/environment.bat
 Modified :
 /sources/tools/integration_tools/branches/mwv2r/buildbot/buildmaster/mwv2r_hd_xxx/bb_MWV2R.py
 }}}

 ...the rev 18152 change is not picked and we get two assertion errors in
 the master log (slave is a Cygwin XP node). Sorry the log is only an
 excerpt and there's no way to match the SVNPoller with the change sources,
 so only guessing here.

 {{{
 2014-01-03 10:32:46+0100 [-] SVNPoller: _process_changes 17651 .. 17651
 2014-01-03 10:32:46+0100 [-] SVNPoller: finished polling None
 2014-01-03 10:32:46+0100 [-] SVNPoller: _process_changes 18142 .. 18152
 2014-01-03 10:32:46+0100 [-] Adding change revision 18152
 2014-01-03 10:32:46+0100 [-] SVNPoller: Error in  while polling
         Traceback (most recent call last):
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/_baseprocess.py", line 60, in
 maybeCallProcessEnded
             proto.processEnded(Failure(reason))
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/utils.py", line 91, in processEnded
             self.deferred.callback(self.s.getvalue())
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 381, in callback
             self._startRunCallbacks(result)
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 489, in _startRunCallbacks
             self._runCallbacks()
         --- <exception caught here> ---
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 576, in _runCallbacks
             current.result = callback(current.result, *args, **kw)
           File "/usr/lib/python2.7/site-
 packages/buildbot/changes/svnpoller.py", line 345, in create_changes
             where = self._transform_path(path)
           File "/usr/lib/python2.7/site-
 packages/buildbot/changes/svnpoller.py", line 293, in _transform_path
             (path, self._prefix))
         exceptions.AssertionError: filepath
 'platform_1/product/middleware/branches/mw_v2_ref/mwv2r_hdsat/environment.bat'
 should start with prefix 'sources/tools'

 2014-01-03 10:32:46+0100 [-] SVNPoller: no changes
 2014-01-03 10:32:46+0100 [-] SVNPoller: _process_changes 15914 .. 15914
 2014-01-03 10:32:46+0100 [-] SVNPoller: finished polling None
 2014-01-03 10:32:46+0100 [-] SVNPoller: _process_changes 18151 .. 18152
 2014-01-03 10:32:46+0100 [-] Adding change revision 18152
 2014-01-03 10:32:46+0100 [-] SVNPoller: Error in  while polling
         Traceback (most recent call last):
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/_baseprocess.py", line 60, in
 maybeCallProcessEnded
             proto.processEnded(Failure(reason))
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/utils.py", line 91, in processEnded
             self.deferred.callback(self.s.getvalue())
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 381, in callback
             self._startRunCallbacks(result)
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 489, in _startRunCallbacks
             self._runCallbacks()
         --- <exception caught here> ---
           File "/usr/lib/python2.7/site-
 packages/twisted/internet/defer.py", line 576, in _runCallbacks
             current.result = callback(current.result, *args, **kw)
           File "/usr/lib/python2.7/site-
 packages/buildbot/changes/svnpoller.py", line 345, in create_changes
             where = self._transform_path(path)
           File "/usr/lib/python2.7/site-
 packages/buildbot/changes/svnpoller.py", line 293, in _transform_path
             (path, self._prefix))
         exceptions.AssertionError: filepath
 'sources/tools/integration_tools/branches/mwv2r/buildbot/buildmaster/mwv2r_hd_xxx/bb_MWV2R.py'
 should start with prefix
 'platform_1/product/middleware/branches/mw_v2_ref/mwv2r_hdsat'
 }}}

 Looking at the code (SVNPoller.create_changes and others), I think the
 transform_path assertion is causing too much trouble.
 In our case, the commit is overlapping the project boundaries, the first
 url breaks on the second prefix, the second url breaks on the first
 prefix: none of the urls can be processed by SVNPoller, so the change is
 not picked up.
 Of course, the commit test urls are built for this example, but we have
 the issue with branch merges/reintegrations all the like.

 I'd be willing to patch, but I'm not sure how and where to catch the
 exception and properly interrupt/bypass the change source algorithm. Any
 idea/comment?

-- 
Ticket URL: <http://trac.buildbot.net/ticket/385#comment:13>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list