Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running multiple poetry install in parallel causes race condition of packages #7154

Closed
4 tasks done
kota65535 opened this issue Dec 7, 2022 · 2 comments
Closed
4 tasks done
Labels
status/duplicate Duplicate issues

Comments

@kota65535
Copy link

  • Poetry version: 1.2.2
  • Python version: 3.10.8
  • OS version and name: macOS
  • pyproject.toml:
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I'm working on monorepo containing 5 poetry projects. My script executes poetry install in parallel to build these projects simultaneously, which causes race condition in the cached packages as shown below.

  RuntimeError

  Hash for pyarrow (10.0.1) from archive pyarrow-10.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl not found in known hashes (was: sha256:11b327120e24a84235dae756a42903b4c3455add50f37743389b35c5825916d3)

  at /opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/poetry/installation/executor.py:681 in _validate_archive_hash
      677│         archive_hash: str = "sha256:" + file_dep.hash()
      678│         known_hashes = {f["hash"] for f in package.files}
      679│ 
      680│         if archive_hash not in known_hashes:
    → 681│             raise RuntimeError(
      682│                 f"Hash for {package} from archive {archive.name} not found in"
      683│                 f" known hashes (was: {archive_hash})"
      684│             )
      685│ 

I tried --no-cache option but in vein. It seems conflicted packages are in ${cache-dir}/artifact, not in ${cache-dir}/cache.

@kota65535 kota65535 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 7, 2022
@neersighted
Copy link
Member

Duplicate #5142, fixed in (the eminent) 1.3.0.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2022
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 7, 2022
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants