Bug 11507

Summary: Assertion error when two buildset configurations use GitPoller for same repository
Product: [Infrastructure] AutoBuilder Reporter: Johannes Schrimpf <johannes.schrimpf>
Component: autobuilderAssignee: Joshua Lock <joshuagloe>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: infras.ab.watcher, Infras.watcher, pidge, pokylinux
Version: unspecified   
Target Milestone: 2.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
A suggested patch which is tested and working on my local setup none

Description Johannes Schrimpf 2017-05-12 14:08:05 UTC
Created attachment 3762 [details]
A suggested patch which is tested and working on my local setup

When two different buildset configurations register a GitPoller for the same repository, an assertion error occurs in buildbot. To prevent this, a check should be implemented whether a GitPoller for this repository is already in yocto-sources and it should only be added if not.

A suggested patch which is tested and working on my local setup is attached.

When reproducing, please note that other than in the documentation different GitPollers have to have different names and that the second poller in the MultiBranch GitPoller example in the documentation overwrites the first one. This will be reported as an additional bug.
Comment 1 Joshua Lock 2017-06-07 14:52:33 UTC
Thanks for the report and the patch! I've merged the attached patch, with some slight changes to the format of the commit message, to the yocto-autobuilder repository:
http://git.yoctoproject.org/clean/cgit.cgi/yocto-autobuilder/commit/?id=15aedc363019afc4361c93ac5571719d1dc6d453

For future contributions we ask that patches are sent to the mailing list yocto@yoctoproject.org for wider review.