Skip to content

Fix lockfile-only versioning strategy not creating some updates that are expected#5581

Merged
deivid-rodriguez merged 2 commits intomainfrom
deivid-rodriguez/lockfile-only-bug
Oct 14, 2022
Merged

Fix lockfile-only versioning strategy not creating some updates that are expected#5581
deivid-rodriguez merged 2 commits intomainfrom
deivid-rodriguez/lockfile-only-bug

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

@deivid-rodriguez deivid-rodriguez commented Aug 24, 2022

The lockfile-only versioning strategy is currently handled by only allowing the dependency itself to be unlocked, but not other dependencies that might depend on it.

This is incorrect, because it could perfectly happen that updating a dependency needs other dependencies to be unlocked too to succeed, yet the end result does not involve anything other than lockfile changes. See #5569 for an example.

This PR reimplements the lockfile-only versioning strategy by passing it to UpdateCheckers as an update strategy and avoid updating any manifest requirements in that case.

I also think this is a good move, because it makes the lockfile-only versioning strategy actually testable! I will add tests later.

Fixes #5569.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/lockfile-only-bug branch 4 times, most recently from d8c0a74 to d872f7a Compare August 29, 2022 17:26
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review August 29, 2022 17:26
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner August 29, 2022 17:26
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/lockfile-only-bug branch from d872f7a to 3aa120c Compare September 15, 2022 12:46
@deivid-rodriguez deivid-rodriguez marked this pull request as draft September 15, 2022 18:37
@deivid-rodriguez deivid-rodriguez self-assigned this Sep 15, 2022
The lockfile-only versioning strategy is currently handled by only
allowing the dependency itself to be unlocked, but not other
dependencies that might depend on it.

This is incorrect, because it could perfectly happen that updating a
dependency needs other dependencies to be unlocked too to succeed, yet
the end result does not involve anything other than lockfile changes.
See #5569 for an example.

This commit reimplements the lockfile-only versioning strategy by
passing it to UpdateCheckers as an update strategy and avoid updating
any requirements in that case.

I also think this is a good move, because it makes the lockfile-only
versioning strategy actually testable, since it now lives inside a core
class.
Hopefully in a backwards compatible way.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/lockfile-only-bug branch from 3aa120c to e14d5f9 Compare October 13, 2022 19:17
@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review October 13, 2022 19:18
@deivid-rodriguez deivid-rodriguez merged commit 2f14e44 into main Oct 14, 2022
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/lockfile-only-bug branch October 14, 2022 12:56
@cvx cvx mentioned this pull request Oct 16, 2022
1 task
deivid-rodriguez added a commit that referenced this pull request Oct 17, 2022
…kfile-only-bug"

This reverts commit 2f14e44, reversing
changes made to 5ae1a8c.

This has caused some regression which I'm working on fixing right now.
But I'd rather work on them without the pressure of those regressions
hitting more people.
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Dependabot cannot update two top-level bundler dependencies with an equality version constraint between them

2 participants