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

Bundler 2 [pre-release]: Detect bundler version to use when bundler 2 is available #3350

Merged
merged 3 commits into from
Mar 30, 2021

Conversation

brrygrdn
Copy link
Contributor

@brrygrdn brrygrdn commented Mar 25, 2021

Depends on #3406

This modifies the bundler_2_available option so it no longer forces use of the bundler 2 native helpers but rather decides based on the lockfile if present.

The primary change is to expand and test the Dependabot::Bundler::Helper to clearly specify scenarios such as defaulting to the newest when no Lockfile is present and failing over to v1 if a file is present but appears to pre-date the BUNDLED_WITH notation.

This also clarifies how Dependabot will behave if a new/malformed Gemfile.lock version were to appear.

bundler/spec/spec_helper.rb Outdated Show resolved Hide resolved
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch from 68dac8d to fd3d377 Compare March 25, 2021 12:15
@brrygrdn
Copy link
Contributor Author

Odd, I didn't expect bundler2 to pass, and it isn't passing for me locally 🤔

@brrygrdn brrygrdn mentioned this pull request Mar 25, 2021
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch from a4f321d to 7cd7e2a Compare March 25, 2021 16:17
@brrygrdn
Copy link
Contributor Author

The only things failing on this PR now should be a handful of tests in the bundler2 build which aren't using project-based fixtures. Since that will make them easy to find, my plan is a follow up commit which fixes this we can optionally cherry-pick unto the main branch.

Almost there!

@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch 5 times, most recently from 6b37a01 to 43e67eb Compare March 26, 2021 10:42
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch 3 times, most recently from 4fbfaec to e481dec Compare March 26, 2021 18:23
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch from 839bcd3 to a5c57ce Compare March 29, 2021 16:28
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch from a5c57ce to b75d941 Compare March 30, 2021 12:17
@brrygrdn brrygrdn changed the base branch from main to brrygrdn/test-bundler2-with-separate-fixtures March 30, 2021 12:18
@brrygrdn brrygrdn changed the title Bundler 2 [pre-release]: [WIP] Detect bundler version to use when bundler 2 is available Bundler 2 [pre-release]: Detect bundler version to use when bundler 2 is available Mar 30, 2021
@brrygrdn brrygrdn marked this pull request as ready for review March 30, 2021 12:19
@brrygrdn brrygrdn requested a review from a team as a code owner March 30, 2021 12:19
@@ -11,7 +11,7 @@

require "functions"

MIN_BUNDLER_VERSION = "2.0.0"
MIN_BUNDLER_VERSION = "2.1.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We actually rely on the Bundler v2.1.0 API for Bundler::URI, which was private in 2.0.x

Copy link
Contributor

@feelepxyz feelepxyz left a comment

Choose a reason for hiding this comment

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

🎉 :shipit:

@brrygrdn brrygrdn force-pushed the brrygrdn/test-bundler2-with-separate-fixtures branch from 6a4290b to 332c3e0 Compare March 30, 2021 12:50
@brrygrdn brrygrdn force-pushed the brrygrdn/detect-bundler-version branch from b75d941 to df1080b Compare March 30, 2021 12:55
Base automatically changed from brrygrdn/test-bundler2-with-separate-fixtures to main March 30, 2021 13:37
@brrygrdn brrygrdn enabled auto-merge March 30, 2021 13:38
@feelepxyz
Copy link
Contributor

🎉 Looks like all bundler tests are ✅ I would probably just merge and start the release over waiting for python to complete 👌

@brrygrdn brrygrdn disabled auto-merge March 30, 2021 13:57
@brrygrdn brrygrdn merged commit 108b719 into main Mar 30, 2021
@brrygrdn brrygrdn deleted the brrygrdn/detect-bundler-version branch March 30, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants