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

Up-to-date packages are re-installed if virtualenvs.create is false #4254

Closed
3 tasks done
jstriebel opened this issue Jul 5, 2021 · 3 comments · Fixed by #4329 or #4433
Closed
3 tasks done

Up-to-date packages are re-installed if virtualenvs.create is false #4254

jstriebel opened this issue Jul 5, 2021 · 3 comments · Fixed by #4329 or #4433
Labels
kind/bug Something isn't working as expected

Comments

@jstriebel
Copy link
Contributor

jstriebel commented Jul 5, 2021

Issue

Packages that were already installed (by poetry itself) are re-installed if virtualenvs.create is false. This bug only appears on v1.2, it does not occur on the 1.1 branch or the latest v1.1 releases. I added a reproducible case via a Dockerfile in the linked gist.

When running docker build . on those files, this produces:

Step 12/14 : RUN poetry install
 ---> Running in 73dfd5dcf683
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Package operations: 3 installs, 0 updates, 2 removals

  • Removing importlib-metadata (4.6.1)
  • Removing zipp (3.5.0)
  • Installing attrs (21.2.0)
  • Installing pyrsistent (0.18.0)
  • Installing jsonschema (3.2.0)
Removing intermediate container 73dfd5dcf683
 ---> 04e982ae2043
Step 13/14 : RUN echo SECOND INSTALL!!!
 ---> Running in 7ec46c74fa47
SECOND INSTALL!!!
Removing intermediate container 7ec46c74fa47
 ---> eff9efcdee5e
Step 14/14 : RUN poetry install
 ---> Running in a877dc9c4864
Skipping virtualenv creation, as specified in config file.
Installing dependencies from lock file

Package operations: 3 installs, 0 updates, 0 removals

  • Installing attrs (21.2.0)
  • Installing pyrsistent (0.18.0)
  • Installing jsonschema (3.2.0)
Removing intermediate container a877dc9c4864

The packages are not installed twice if virtualenvs.create is true (tested by commenting out the COPY poetry.toml / line).

Possibly related previous issues: #1711, #1882 (solved in previous releases, but re-introduced in v1.2)

Given that this was broken multiple times in different ways now, would it be possible to add some tests for this case as well? I'd be happy to help here, but have no experience with the poetry code-base.

@jstriebel jstriebel added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jul 5, 2021
@jstriebel
Copy link
Contributor Author

@sdispater Unfortunately #4329 did not resolve this issue, can you re-open it please? I tested it with version 1.2.0a2 and the current master, both result in re-installing the packages with the second poetry install.

@jstriebel
Copy link
Contributor Author

Re-opened this as #4358. I re-checked exactly what I described with 1.2.0a2 which includes #4329, and get the same results. Please let me know if I overlooked something.

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
Copy link

github-actions bot commented Mar 2, 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 2, 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
Projects
None yet
2 participants