-
Notifications
You must be signed in to change notification settings - Fork 1k
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
dependabot should bump BUNDLED WITH
in gemfile lock
#4095
Comments
I support this as well. I am currently using bundler v2.1.4 in my repo, but dependabot does the bundle updates with the newest version. And I think code speaks for iteself! v2.1.4 Gemfile.lock format:
v2.2.26 (as an example to show the difference) Gemfile.lock format:
|
Yep, also saw this rubygems/rfcs#29 (comment) |
Yeah this is a tricky one, the lockfile format was actually changed a good while back, but since recently bundler will also actively try to update you to the newest format. I believe the new format should work in 2.1.4 without problems (and would have that same format if created from scratch). The reason I find this a little tricky is that definitely not everyone will want us to bump their bundler version in regular updates. For most scenario's where your lockfile format is already up to date (or you're still on bundler 1) you shouldn't notice that we run a different version of bundler under the hood. Ideally I think we'd run updates using the bundler version as specified, and open separate PRs to update the package manager version, but the latter is something we currently don't do for any ecosystem. And tbh given our current setup this will be a fair amount of work that we likely can't get to in the near term. Now I don't want to let perfect be the enemy of good, but I think that maybe keeping things as is for now might be the best compromise? cc @asciimike curious to hear your thoughts |
I've seen this issue too (from a 2.1.4 lockfile). Running
|
@jurre
This will at least not change the format of the Gemfile.lock when just a dependency is being updated.
|
Ah, that's good to know, it's a bummer that a minor version update of bundler breaks compatibility in this way :( I'll see if there's something we can do to prevent the lockfile format changing in Dependabot updates for now. |
This also caused a bit of a nightmare for my team, since Travis uses 2.1.4 as well, so we kept our Gemfile.lock on that version. We use one gem hosted on a private repo, and Dependabot was changing the Gemfile.lock automatically in the PRs. All of our Dependabot PR builds were failing as a result, and we had to add the following line to the We also had to bump the version number at the bottom of the Gemfile.lock, and ensure that our developers' project gemsets are now on 2.2.27. On the plus side, we needed to do all of that anyway to address the security concern; I just didn't expect a Dependabot update to force our hand. |
Yeah that's definitely fair. I think we could patch bundler here to disable the behavior, but I'm a little hesitant if we should. I agree that updating the lockfile format should probably be done outside of dependabot, and us doing so for bundler versions that don't support it is definitely undesirable, but I'm not sure what other side-effects we might introduce with such a patch, and maintaining it might be painful over the long run 🤔 cc @brrygrdn wdyt? |
@jurre Wouldn't it be better, to always run bundler with the version from I see this as the safest approach and would also then work with ANY bundler version out there. |
Yep, ideally that would be best, but it's not feasible with how Dependabot is currently implemented, we use bundler both as a library and a CLI, and to manage our own dependencies. It's certainly possible eventually, but we'll need to carve out some dedicated time for it and our teams bandwidth currently doesn't allow for it :( |
Thanks for the explanation! |
I'm glad to see this is actively being worked on! Just wanted to add that I'm also experiencing this same issue with Bundler 2.1.4 - took me several days of debugging to figure out what was up because I was thrown off by the lack of change to |
Closing as stale |
Occasionally there are bugfixes and even security fixes, would be good to bump it.
While it wouldn't actually prevent using older bundler unless something like
gem install --clear-sources bundler -v $(grep -A1 'BUNDLED WITH' Gemfile.lock | tail -1 | sed -e 's/[[:space:]]*//')
during image build is used, it will provide visibility and nag people to perform an update.The text was updated successfully, but these errors were encountered: