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

poetry lock --no-update gives different results on bitbucket pipeline - egg files are missing #7155

Closed
4 tasks done
noamraph opened this issue Dec 7, 2022 · 6 comments
Closed
4 tasks done
Labels
kind/question User questions (candidates for conversion to discussion)

Comments

@noamraph
Copy link
Contributor

noamraph commented Dec 7, 2022

  • 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 added poetry lock --no-update to my bitbucket pipeline (originally using pre-commit, but it does the same with a simple installation). This caused my pipeline to fail, since on the pipeline the resulting poetry.lock file is different.

I created a sample repository with the failing pipeline: https://bitbucket.org/noamdx/poetry-bug/pipelines/results/page/1

This is the diff:

diff --git a/poetry.lock b/poetry.lock
index c24275c..8c7ebc2 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -13,17 +13,6 @@ content-hash = "1065ffba5285a6adeb206894d4edf05c5b5f4941a0337564ef03f4e2a5c58298
 
 [metadata.files]
 pyasn1 = [
-    {file = "pyasn1-0.4.8-py2.4.egg", hash = "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3"},
-    {file = "pyasn1-0.4.8-py2.5.egg", hash = "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf"},
-    {file = "pyasn1-0.4.8-py2.6.egg", hash = "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00"},
-    {file = "pyasn1-0.4.8-py2.7.egg", hash = "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8"},
     {file = "pyasn1-0.4.8-py2.py3-none-any.whl", hash = "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d"},
-    {file = "pyasn1-0.4.8-py3.1.egg", hash = "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86"},
-    {file = "pyasn1-0.4.8-py3.2.egg", hash = "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7"},
-    {file = "pyasn1-0.4.8-py3.3.egg", hash = "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576"},
-    {file = "pyasn1-0.4.8-py3.4.egg", hash = "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12"},
-    {file = "pyasn1-0.4.8-py3.5.egg", hash = "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2"},
-    {file = "pyasn1-0.4.8-py3.6.egg", hash = "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359"},
-    {file = "pyasn1-0.4.8-py3.7.egg", hash = "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776"},
     {file = "pyasn1-0.4.8.tar.gz", hash = "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba"},
 ]

It seems that the .egg files are missing.

Here is the output of poetry lock -vvv --no-update on my computer and on the bitbucket pipeline. I don't see any difference:

poetry-lock-my.txt
poetry-lock-bitbucket.txt

Thanks!
Noam

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

dimbleby commented Dec 7, 2022

#5767

presumably the egg-containing lockfile was generated by an older version of poetry

@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Dec 7, 2022
@neersighted
Copy link
Member

You should re-lock or manually remove the eggs and commit the file; modern versions of Poetry no longer track eggs.

@noamraph
Copy link
Contributor Author

noamraph commented Dec 7, 2022

@dimbleby On my computer, with poetry 1.2.2, if I remove poetry.lock and run poetry lock --no-update I get the same file as before, with the eggs. I suggest to re-open the issue.

@neersighted
Copy link
Member

Clear your cache, I think we might use the values stored within blindly which is keeping the wheels around.

@noamraph
Copy link
Contributor Author

noamraph commented Dec 8, 2022

@neersighted thanks! Indeed, when I cleared the cache it solved the issue.
I think this is still an issue - I did nothing wrong, and yet it took quite a lot of effort to solve my problem. I guess a solution is to ignore or remove caches from older versions that behaved differently.

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
kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

3 participants