chaoss / chaoss/CollectOSS

process_dependency_metrics file not found - Facade race condition

Open
#247 3 comments 0 reactions 0 assignees View on GitHub
deployed version
Dominant language
Python
Stars
13
Forks
17
Avg merge
6h 59m
Merged PRs (30d)
1

Description

> [!NOTE]
> Migrated from [augurlabs/augur#3767](https://github.com/augurlabs/augur/issues/3767)
> Originally opened by `@MoralCode` on 2026-03-06

---

Repo: https://github.com/flannel-io/flannel

Task: augur.tasks.git.dependency_tasks.tasks.process_dependency_metrics

Stack Trace

```
Traceback (most recent call last):
File "/augur/.venv/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task
R = retval = fun(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/augur/.venv/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__
return self.run(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/augur/augur/tasks/git/dependency_tasks/tasks.py", line 14, in process_dependency_metrics
generate_deps_data(logger, repo_git)
File "/augur/augur/tasks/git/dependency_tasks/core.py", line 32, in generate_deps_data
deps = dep_calc.get_deps(path,logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/augur/augur/tasks/git/dependency_tasks/dependency_util/dependency_calculator.py", line 43, in get_deps
deps.extend(get_language_deps(path, lib_module, name,logger))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/augur/augur/tasks/git/dependency_tasks/dependency_util/dependency_calculator.py", line 48, in get_language_deps
files = language.get_files(path)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/augur/augur/tasks/git/dependency_tasks/dependency_util/c_deps.py", line 8, in get_files
files = list(p.glob('**/*.c'))
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 953, in glob
for p in selector.select_from(self):
File "/usr/local/lib/python3.11/pathlib.py", line 407, in _select_from
for starting_point in self._iterate_directories(parent_path, is_dir, scandir):
File "/usr/local/lib/python3.11/pathlib.py", line 397, in _iterate_directories
for p in self._iterate_directories(path, is_dir, scandir):
File "/usr/local/lib/python3.11/pathlib.py", line 386, in _iterate_directories
with scandir(parent_path) as scandir_it:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/pathlib.py", line 938, in _scandir
return os.scandir(self)
^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/augur/facade/32856-github.com-flannel-io-flannel/flannel/docs'

```

this facade task has the facade core collection chain (poorly named) and the dependency metrics in the same group, allowing them to run in parallel. This appears to result in a race condition where this task runs before facade has cloned or updated the repo.

https://github.com/chaoss/augur/blob/413383af55d08411a5ce40cf3afaecf602f66de6/augur/tasks/git/facade_tasks.py#L502-L507

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.