Fix lockfile-only versioning strategy not creating some updates that are expected#5581
Merged
deivid-rodriguez merged 2 commits intomainfrom Oct 14, 2022
Merged
Conversation
d8c0a74 to
d872f7a
Compare
d872f7a to
3aa120c
Compare
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.
3aa120c to
e14d5f9
Compare
jurre
approved these changes
Oct 14, 2022
1 task
This was referenced Oct 17, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
lockfile-onlyversioning 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-onlyversioning strategy by passing it toUpdateCheckersas 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-onlyversioning strategy actually testable! I will add tests later.Fixes #5569.