Lockfile generation hangs indefinitely when cache is corrupted
See original GitHub issue-
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). -
OS version and name: macOS 11.6
-
Poetry version: 1.1.13
-
Python version: 3.9.13
Issue
poetry lock
will hang indefinitely when trying to resolve a project with django-cors-headers
as a dependency.
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = []
[tool.poetry.dependencies]
python = "^3.9"
django-cors-headers = "^3.13.0"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
$ poetry lock -vvv
Using virtualenv: /Users/user/Library/Caches/pypoetry/virtualenvs/poetry-test-hz2NYSp8-py3.9
Updating dependencies
Resolving dependencies...
1: fact: poetry-test is 0.1.0
1: derived: poetry-test
1: fact: poetry-test depends on django-cors-headers (^3.13.0)
1: selecting poetry-test (0.1.0)
1: derived: django-cors-headers (>=3.13.0,<4.0.0)
<sits frozen here forever>
I hunted this down after a larger project would never resolve dependencies (#2094), and narrowed it down to this single package.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Announcing Poetry 1.3.0 | Blog
The former typically manifested as an indefinite hang while making HTTP requests, and should be prevented entirely on Poetry 1.3, regardless of ...
Read more >pak lockfile creation within github action hangs forever
I am using 'r-lib/actions/setup-r-dependencies@v2' within another action and it starts fine but for some reason it hangs when pak is ...
Read more >Deleting `package-lock.json` to Resolve Conflicts quickly
In a team set up, usually, I have faced merge conflicts in package-lock.json and my quick fix has always been to delete the...
Read more >Create a safe abstraction / pattern for atomically updating files ...
If a cache miss occurs (i.e. the file pattern $REPO/1/$HASH.* is absent):. The reader will look inside the latest generation directory (e.g. $REPO/ ......
Read more >pacman - ArchWiki
"Failed to commit transaction (invalid or corrupted package)" error. Look for .part files (partially downloaded packages) in /var/cache/pacman/ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
it’s just a bunch of files, there’s no special magic. zip / tar them up. Minimal reproducer much preferred, ie if you can remove things that aren’t relevant then all the better.
hash mismatches are at least fairly clear, but hanging is not so good - if we can reproduce that then it would be worth poetry trying to cope better with whatever mess it has found.
@dimbleby Unfortunately I did not. I suspect that when Ctrl-C’ing Poetry during install/update/etc a file was saved in a partial, incomplete state.
The last time this happened to me, there was a hash mismatch. This time
lock
never progressed.If this happens again, I will attempt to save the cache. Is it documented somewhere how to save the cache?