Page MenuHomePhabricator

`quibble` fails with git 2.15: Type of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'
Closed, ResolvedPublic

Description

~/Documents/gerrit/integration/quibble$ pip3 freeze|grep -i GitPython
GitPython==2.1.1

~/Documents/gerrit/integration/quibble$ git --version
git version 2.15.1 (Apple Git-101)

~/Documents/gerrit/integration/quibble$ quibble
DEBUG:quibble.cmd:Running stages: all
INFO:quibble.cmd:Adding mediawiki/vendor
INFO:quibble.cmd:Projects: mediawiki/core, mediawiki/skins/Vector, mediawiki/vendor
INFO:zuul.CloneMapper:Workspace path set to: /Users/z/Documents/gerrit/integration/quibble/src
INFO:zuul.CloneMapper:Mapping projects to workspace...
INFO:zuul.CloneMapper:  mediawiki/core -> /Users/z/Documents/gerrit/integration/quibble/src
INFO:zuul.CloneMapper:  mediawiki/skins/Vector -> /Users/z/Documents/gerrit/integration/quibble/src/skins/Vector
INFO:zuul.CloneMapper:  mediawiki/vendor -> /Users/z/Documents/gerrit/integration/quibble/src/vendor
DEBUG:zuul.CloneMapper:Checking overlap in destination directories...
INFO:zuul.CloneMapper:Expansion completed.
INFO:zuul.Cloner:Preparing 3 repositories
INFO:zuul.Cloner:Creating repo mediawiki/core from upstream https://gerrit.wikimedia.org/r/p/mediawiki/core
DEBUG:zuul.Repo:Resetting repository /Users/z/Documents/gerrit/integration/quibble/src
DEBUG:zuul.Repo:Updating repository /Users/z/Documents/gerrit/integration/quibble/src
Traceback (most recent call last):
  File "/usr/local/bin/quibble", line 11, in <module>
    load_entry_point('quibble', 'console_scripts', 'quibble')()
  File "/Users/z/Documents/gerrit/integration/quibble/quibble/cmd.py", line 405, in main
    cmd.execute()
  File "/Users/z/Documents/gerrit/integration/quibble/quibble/cmd.py", line 300, in execute
    self.clone(projects_to_clone)
  File "/Users/z/Documents/gerrit/integration/quibble/quibble/cmd.py", line 142, in clone
    cache_dir=self.args.git_cache)
  File "/Users/z/Documents/gerrit/integration/quibble/quibble/zuul.py", line 47, in clone
    return zuul_cloner.execute()
  File "/Users/z/Documents/gerrit/integration/quibble/zuul/lib/cloner.py", line 75, in execute
    self.prepareRepo(project, dest)
  File "/Users/z/Documents/gerrit/integration/quibble/zuul/lib/cloner.py", line 169, in prepareRepo
    repo.reset()
  File "/Users/z/Documents/gerrit/integration/quibble/zuul/merger/merger.py", line 102, in reset
    for ref in origin.refs:
  File "/usr/local/lib/python3.6/site-packages/git/remote.py", line 527, in refs
    out_refs.extend(RemoteReference.list_items(self.repo, remote=self.name))
  File "/usr/local/lib/python3.6/site-packages/git/util.py", line 932, in list_items
    out_list.extend(cls.iter_items(repo, *args, **kwargs))
  File "/usr/local/lib/python3.6/site-packages/git/refs/symbolic.py", line 592, in _iter_items
    for sha, rela_path in cls._iter_packed_refs(repo):  # @UnusedVariable
  File "/usr/local/lib/python3.6/site-packages/git/refs/symbolic.py", line 92, in _iter_packed_refs
    raise TypeError("PackingType of packed-Refs not understood: %r" % line)
TypeError: PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'

Event Timeline

That is the suspicious bit:

TypeError: PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'

I guess some git-python version is misbehaving. 'GitPython<2.1.2' should work.

https://github.com/gitpython-developers/GitPython/issues/687 PackingType of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'
https://github.com/kennethreitz/legit/issues/225 TypeError: PackingType of packed-Refs not understood
https://github.com/gitpython-developers/GitPython/pull/689 recognize the new packed-ref header format

The fix would be in GitPython 2.1.8 / 2.1.9 which has the commit 66328d76 recognize the new packed-ref header format.

So we need to bump GitPython to 2.1.8+ I guess

hashar renamed this task from `quibble` fails on a Mac to `quibble` fails with git 2.15: Type of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'.Apr 26 2018, 10:18 AM

Debian provides:

JessieStretch
python3-git 2.1.1python3-git 2.1.1
git 2.1.4git 2.11

And that is compatible, so the CI containers are not affected. For git 2.15 such as installed via Homebrew we need 2.1.8+. Probably Quibble can allow for either 2.1.1 or 2.1.8.

Change 429195 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/quibble@master] Allow more recent GitPython version

https://gerrit.wikimedia.org/r/429195

Change 429195 merged by jenkins-bot:
[integration/quibble@master] Allow more recent GitPython version

https://gerrit.wikimedia.org/r/429195

Vvjjkkii renamed this task from `quibble` fails with git 2.15: Type of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted' to m8daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed hashar as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: gerritbot.
Mainframe98 renamed this task from m8daaaaaaa to `quibble` fails with git 2.15: Type of packed-Refs not understood: '# pack-refs with: peeled fully-peeled sorted'.Jul 1 2018, 9:14 AM
Mainframe98 closed this task as Resolved.
Mainframe98 assigned this task to hashar.
Mainframe98 raised the priority of this task from High to Needs Triage.
Mainframe98 updated the task description. (Show Details)
Mainframe98 added a subscriber: gerritbot.