Ticket #385 (closed defect: fixed)
SVNPoller transform_path AssertionError when change includes modifications to files inside and outside the svnurl
| Reported by: | mmacvicar | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.8.8 |
| Version: | 0.7.9 | Keywords: | svn |
| Cc: | dwlocks, J2ck, flaviojs, bdbaddog |
Description
SVNPoller transform_path AssertionError? when change includes modifications to files inside and outside the svnurl
I had my SVNPoller set up to monitor svnurl=' http://subversion/trunk/Code'. A checkin was made that changed files in /trunk/Code and /trunk/QA, but the change was ignored and the error below was written to twistd.log. I would expect it to be able to handle checkins that have file modifications inside and outside the svnurl.
2008/11/14 18:09 -0800 [-] svnPoller: _process_changes 10523 .. 10524
2008/11/14 18:09 -0800 [-] Adding change revision 10524
2008/11/14 18:09 -0800 [-] SVNPoller failed
2008/11/14 18:09 -0800 [-] _finished : [Failure instance: Traceback: <type 'exceptions.AssertionError'>: filepath 'trunk/QA/Tests/TriTests/StressShadePrim.cpp'
should start with prefix 'trunk/Code'
/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py:304:_startRunCallbacks
/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py:317:_runCallbacks
/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py:281:_continue
/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py:277:unpause
--- <exception caught here> ---
/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py:317:_runCallbacks
/usr/local/lib/python2.5/site-packages/buildbot/changes/svnpoller.py:413:create_changes
/usr/local/lib/python2.5/site-packages/buildbot/changes/svnpoller.py:375:_transform_path
/usr/local/lib/python2.5/site-packages/buildbot/changes/svnpoller.py:20:_assert
]
I can work around this issue by truncating the svnurl to ' http://subversion' and using split_file to generate (branch, filepath) information, but that wasn't very intuitive.
Reproducible Steps:
- Set your SVNPoller svnurl to a branch (e.g., svnurl=' http://subversion/trunk/Code')
- submit a change that include files in that branch and files outside of that branch.
Change History
comment:4 in reply to: ↑ 1 Changed 10 months ago by miller-mohr
Replying to dustin:
Not entirely clear what it should do with such commits, though -- it's not really testing the entire commit, right?
Hi,
so first of all thanks for buildbot, I like it and it's helpful :-) And now to the actual comments.
I am a working on a software development project for a scientific simulation code. We use buildbot to run a testsuite including compilation of our project and execution of some test runs (sort of basic regression tests). The testsuite is executed on an HPC cluster at a university computing center. Consequently we only want to execute the testsuite, if there are changes to the source code of the project, but not, if a commit only changes e.g. the doxygen configuration file, or some other part that is not directly related to the actual code base. Otherwise, we'd waste precious HPC resources and risk making the computing centre people real angry ;-)
Thus, from my limited user's point of view, I'd simply expect to trigger buildbot, whenever a commit includes those parts SVNPoller is watching. Something wrong with this POV?
Cheers Marcus
comment:5 follow-up: ↓ 6 Changed 10 months ago by dustin
In that case, you should be using fileIsImportant, rather than changing the root of the SVN tree.
This definitely shouldn't fail with an AssertionError, and should probably just ignore the out-of-scope files.
comment:6 in reply to: ↑ 5 Changed 10 months ago by miller-mohr
Replying to dustin:
In that case, you should be using fileIsImportant, rather than changing the root of the SVN tree.
This definitely shouldn't fail with an AssertionError, and should probably just ignore the out-of-scope files.
Thanks for the quick reply and the hint. I'll forward the info to my 'remote' buildbot admin.
Cheers Marcus
comment:7 Changed 8 months ago by tom.prince
- Cc dwlocks, J2ck, flaviojs, bdbaddog added
Adding a bunch of people to the CC list, since I'm not sure what the expected behaviour here should be.
comment:8 Changed 8 months ago by flaviojs
When getting the logs, revisions that don't affect the SVNPoller.svnurl path are already being filtered out by svn.
Since the poller doesn't even consider them, I would expect it not to consider unrelated paths that come with the logs and just filter them out.
comment:11 Changed 4 months ago by Tom Prince
- Status changed from new to closed
- Resolution set to fixed
svnpoller: Don't fail when revisions contain changes outside our prefix.
When getting the logs, revisions that don't affect the SVNPoller.svnurl path are already being filtered out by svn. Since the poller doesn't even consider them, I would expect it not to consider unrelated paths that come with the logs and just filter them out.
Fixes #385.
Changeset: 1732adcc3eb11477d9fe9258fe772e3defaa3b34
comment:12 Changed 3 months ago by Tom Prince
svnpoller: Don't fail when revisions contain changes outside our prefix.
When getting the logs, revisions that don't affect the SVNPoller.svnurl path are already being filtered out by svn. Since the poller doesn't even consider them, I would expect it not to consider unrelated paths that come with the logs and just filter them out.
Fixes #385.
Changeset: 1732adcc3eb11477d9fe9258fe772e3defaa3b34
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
Not entirely clear what it should do with such commits, though -- it's not really testing the entire commit, right?