chaoss / chaoss/grimoirelab-perceval

[git] AttributeError: '_GraphWalker' object has no attribute 'shallow'

Open
#876 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
324
Forks
187
PR merge metrics
No merged PRs in 30d

Description

When I ran Mordred, I got this error
```
2025-08-21 11:23:05,767 - GrimoireLab - grimoire_elk.elk - ERROR - Error feeding raw from git (https://github.com/**.git): '_GraphWalker' object has no attribute 'shallow'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/grimoire_elk/elk.py", line 209, in feed_backend
ocean_backend.feed(**params)
File "/usr/local/lib/python3.12/site-packages/grimoire_elk/raw/elastic.py", line 234, in feed
self.feed_items(items)
File "/usr/local/lib/python3.12/site-packages/grimoire_elk/raw/elastic.py", line 250, in feed_items
for item in items:
^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backend.py", line 316, in fetch
for item in self.fetch_items(category, **kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backends/core/git.py", line 166, in fetch_items
commits = self._fetch_from_repo(from_date, to_date, branches,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backends/core/git.py", line 299, in _fetch_from_repo
commits = self._fetch_newest_commits_from_repo(repo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backends/core/git.py", line 336, in _fetch_newest_commits_from_repo
hashes = repo.sync()
^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backends/core/git.py", line 1111, in sync
pack_name, refs = self._fetch_pack()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/perceval/backends/core/git.py", line 1336, in _fetch_pack
result = client.fetch_pack(repo_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dulwich/client.py", line 3009, in fetch_pack
(new_shallow, new_unshallow) = _handle_upload_pack_head(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/dulwich/client.py", line 597, in _handle_upload_pack_head
if depth not in (0, None) or graph_walker.shallow:
^^^^^^^^^^^^^^^^^^^^
AttributeError: '_GraphWalker' object has no attribute 'shallow'

```

Contributor guide

Open the contributing guide

Research direction

Start with perceval/backends/core/git.py, especially sync(), _fetch_pack(), and the client.fetch_pack() call shown in the traceback. Reproduce the Mordred Git fetch, inspect the interaction with dulwich's _GraphWalker, and verify that repository synchronization completes without the AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
backend, data-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.