Skip to content

Fix lockfile-only versioning strategy not creating some updates that are expected (v2)#5902

Merged
deivid-rodriguez merged 2 commits intomainfrom
deivid-rodriguez/fix-bad-lockfile-only-updates
May 5, 2023
Merged

Fix lockfile-only versioning strategy not creating some updates that are expected (v2)#5902
deivid-rodriguez merged 2 commits intomainfrom
deivid-rodriguez/fix-bad-lockfile-only-updates

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
Contributor

@deivid-rodriguez deivid-rodriguez commented Oct 17, 2022

Trying to retry #5581, but in a correct way now.

Fixes #5569.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from 9d5eded to e3776ef Compare October 17, 2022 12:14
@deivid-rodriguez deivid-rodriguez changed the title Fix lockfile-only strategy creating bad updates Fix lockfile-only versioning strategy not creating some updates that are expected (v2) Oct 17, 2022
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from e3776ef to e4d2428 Compare October 17, 2022 12:31
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch 4 times, most recently from 6c63855 to f033fbc Compare April 7, 2023 20:15
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

This PR is now rebased and green again 🎉.

Still left to do is the verify that both the original problem and the regression that motivated the original revert no longer happen with this PR.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from f033fbc to 1521427 Compare April 11, 2023 15:46
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I verified that #5569 is still happening, and that this PR is still fixing it. And also that this PR does not reintroduce #5892.

So setting this as ready!

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review April 11, 2023 15:47
@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner April 11, 2023 15:47
@abdulapopoola abdulapopoola added the T: bug 🐞 Something isn't working label Apr 11, 2023
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from 1521427 to 463bc2b Compare April 19, 2023 14:42
@github-actions github-actions bot added L: javascript L: php:composer Issues and code for Composer L: python L: ruby:bundler RubyGems via bundler L: rust:cargo Rust crates via cargo labels Apr 19, 2023
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from 463bc2b to d800116 Compare April 19, 2023 15:47
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

I extracted one change to a separate PR so this should be a bit more digestible now.

Copy link
Copy Markdown
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

This looks 👍 to me, with the caveat that it touches a lot of code and I didn't spend time to deeply investigate every bit.

But what I can see makes sense, and there's reasonable CI around it, so I think we should 🚢 and if anything comes up we can course correct as needed.

@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from d800116 to 2d1affe Compare May 5, 2023 10:52
Currently only the "lockfile_only" and "auto" strategies are supported,
and the lockfile_only one is handled separately. However, once the
lockfile_only strategy is handled as just another requirement update
strategy, this will need to support custom strategies, since that will
be passed around.

Fix that for now, also making cargo look like all the other update
checkers, that support custom strategies.
In addition to avoiding updating Requirements in `RequirementUpdater`
classes, the lockfile-only strategy needs to also be checked when we
decide which requirements to unlock in order to figure out the target
version, because otherwise, even if we don't allow the manifest file to
change, we'll still may be allowing higher target versions than the
manifest allows, causing the lock file to fall out of sync.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/fix-bad-lockfile-only-updates branch from 14a08ac to c1fa6d8 Compare May 5, 2023 14:32
@deivid-rodriguez
Copy link
Copy Markdown
Contributor Author

Let's try this again! 🤞

@deivid-rodriguez deivid-rodriguez merged commit 664ff22 into main May 5, 2023
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/fix-bad-lockfile-only-updates branch May 5, 2023 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L: javascript L: php:composer Issues and code for Composer L: python L: ruby:bundler RubyGems via bundler L: rust:cargo Rust crates via cargo T: bug 🐞 Something isn't working

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

3 participants