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

Potentially a concurrency issue while installing packages #4568

Closed
3 tasks done
rootcss opened this issue Sep 28, 2021 · 4 comments
Closed
3 tasks done

Potentially a concurrency issue while installing packages #4568

rootcss opened this issue Sep 28, 2021 · 4 comments
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@rootcss
Copy link

rootcss commented Sep 28, 2021

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

Issue

While running the poetry install command, it randomly fails (not everytime) with errors like:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/build_8c19dde7/.heroku/python/lib/python3.8/site-packages/~dna-3.2.dist-info'

This doesn't happen for a specific package, but rather for any random package. @finswimmer has responded to it in the following link: https://githubmemory.com/repo/python-poetry/poetry/issues/4297 but this is still happening. It potentially looks like a concurrency issues while installing the packages as mentioned by cfra

@rootcss rootcss added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 28, 2021
@uSpike
Copy link
Contributor

uSpike commented Dec 6, 2021

Just want to add that I'm seeing this issue randomly across CI and multiple poetry install executions. Trying to craft a reproduction case...

@jedie
Copy link

jedie commented Sep 21, 2022

I'm seeing this issue randomly across CI and multiple poetry install executions

Think i have the same problem in Github Actions, because of caching e.g.:

Think i have to split the cache.

jedie pushed a commit to boxine/bx_django_utils that referenced this issue Sep 21, 2022
Remove `setUpTestData` from `PlaywrightTestCase` because it doesn't work call this from
`setUpClass`, because all data will be removed after the first test.

The `PlaywrightTestCase` used `StaticLiveServerTestCase` that inherits from `TransactionTestCase`
that will flush the database after each tests.

The `LiveServerTestCase` doc string says:
```
It inherits from TransactionTestCase instead of TestCase because the
threads don't share the same transactions (unless if using in-memory sqlite)
and each thread needs to commit all their transactions so that the other
thread can see the changes.
```
See also: https://code.djangoproject.com/ticket/23640

We can call `setUpTestData` from `setUp`. But the class method `setUpTestData` originally stands for
initializing test data for the entire test case, so don't do this. It's up to the child class how to
create initial test data.

Raise a warning if there is a `setUpTestData` to clarify that it's not usable.

Additional fixes:

Remove pytest warning by add the marker to `[tool.pytest.ini_options]`:
```
PytestUnknownMarkWarning: Unknown pytest.mark.playwright - is this a typo?  You can register custom
marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.playwright
```

Split github actions PyPi cache, see: python-poetry/poetry#4568
@neersighted
Copy link
Member

Should be fixed by #6186 if this is indeed concurrent writes to the cache -- there is not enough detail to tell if it could be something else, so I am closing this barring more information (especially a reproduction)

Copy link

github-actions bot commented Mar 1, 2024

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 Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants