Skip to content

Comments

Fix locked VCS dependencies always being updated#3875

Merged
abn merged 2 commits intomasterfrom
fix-locked-vcs-dependecies
Apr 7, 2021
Merged

Fix locked VCS dependencies always being updated#3875
abn merged 2 commits intomasterfrom
fix-locked-vcs-dependecies

Conversation

@sdispater
Copy link
Member

@sdispater sdispater commented Apr 2, 2021

The issue was caused by multiple factors:

  • Every package was marked as "use the latest version" which led to the packages not being retrieved from the locked repository. While this did not matter for "normal" packages this had the unintended side effect of pulling the latest revision of VCS dependencies regardless of the locked version. This was the main problem.
  • Even when the locked version was used, Poetry would still clone VCS dependencies even though it was no longer needed. This is solved by using the Provider.load_deferred(False) since we already have all the information when installing from the lock file.

Pull Request Check List

Resolves: #2921

  • Added tests for changed code.
  • Updated documentation for changed code.

@sdispater sdispater requested a review from a team April 2, 2021 13:42
@abn
Copy link
Member

abn commented Apr 2, 2021

This seems to be partially a dupe of #3867.

@sdispater
Copy link
Member Author

This seems to be partially a dupe of #3867.

It's not really a duplicate (except for the checkout of resolved references). This PR actually fixes the issue by using an existing mechanism available in the Provider and by making sure that locked packages are actually used when resolving dependencies against the lock file which was not actually the case up until now.

@abn
Copy link
Member

abn commented Apr 5, 2021

Cirrus tests are failing as they use uncached dependencies. Seems the GHA cached the "latest" master from poetry-core with the 3.10 fix, which was fixed on poetry master via 26a260a. Since this change is fixing the issue, that caused us using an unlocked version of poetry-core git source, we might need to regenerate the lock file with the latest master perhaps?

Copy link
Member

@abn abn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and looks like the cirrus failures is actually due to the fix taking effect. See comment above.

@sdispater
Copy link
Member Author

@abn I updated the lock file with the latest revision of poetry-core

@abn
Copy link
Member

abn commented Apr 6, 2021

@sdispater looks like the PEP-610 changes caused a conflict. Otherwise LGTM

@sdispater sdispater force-pushed the fix-locked-vcs-dependecies branch from 3eda9d2 to 2894542 Compare April 7, 2021 09:45
@sdispater
Copy link
Member Author

@abn Conflicts are fixed

@github-actions
Copy link

github-actions bot commented Mar 1, 2024

This pull request 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

poetry update with git-based dependencies updates poetry.lock but not the virtual environment

2 participants