Repository that's in the base directory of another repository doesn't initialise properly

Bug #1235005 reported by Mark Holmquist
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zuul
New
Undecided
Unassigned

Bug Description

We have a set of repositories like this in Gerrit:

wikimedia/fundraising/crm
wikimedia/fundraising/crm/drupal
wikimedia/fundraising/crm/civicrm

The latter two had jobs configured for them first, so they got cloned properly into zuul/git/wikimedia/fundraising/crm. But now, as far as I can tell, Zuul just checks whether the directory exists for the first one, finds it does, and goes in and happily tries to update the repo. Which obviously fails because the repo was never initialised.

If this is actually the issue, then Zuul should probably be checking for the existence of a .git directory before it runs git commands - if it's not, the error I'm seeing is this:

2013-10-03 23:08:49,328 ERROR zuul.Merger: Unable to update wikimedia/fundraising/crm
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/zuul-ac3ba4f-py2.7.egg/zuul/merger.py", line 156, in updateRepo
    repo.update()
  File "/usr/local/lib/python2.7/dist-packages/zuul-ac3ba4f-py2.7.egg/zuul/merger.py", line 106, in update
    origin = self.repo.remotes.origin
  File "/usr/lib/python2.7/dist-packages/git/util.py", line 612, in __getattr__
    return list.__getattribute__(self, attr)
AttributeError: 'IterableList' object has no attribute 'origin'

Revision history for this message
Antoine "hashar" Musso (hashar) wrote :

Wikimedia bug https://bugzilla.wikimedia.org/show_bug.cgi?id=55896

Potentially Zuul could look for .git, if it is not there, create the directory and do a git clone --bare there, eventually checkout the branch in the workspace.

The way I fixed it:

cd wikimedia/fundraising/crm
git remote add origin ssh://<email address hidden>:29418/wikimedia/fundraising/crm
git checkout master

For some reason I also had to git remote set-head origin -a

That properly created the issue. IMHO that is not very important, it is really a corner case.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.