Skip to content

process_dependency_metrics file not found - Facade race condition #3767

Description

@MoralCode

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-git.832008.xyz-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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolved in AveloxisIssue is resolved in https://github.com/aveloxis/aveloxisdeployed versionLive problems with deployed versions

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions