-
Notifications
You must be signed in to change notification settings - Fork 18
chore: rework Gemfiles. #645
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
Merged
Merged
Conversation
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
c22b861 to
4bc24f8
Compare
ayousufi
approved these changes
Jul 8, 2025
4bc24f8 to
882f28f
Compare
Dependabot is currently broken for ElasticGraph: dependabot/dependabot-core#12426 Troubleshooting points to a root cause of Bundler 2.6.9 (used by the latest dependabot) having some subtle changes to how gemspecs are handled. Specifically, this PR: ruby/rubygems#8480 In that PR, the `gemspec` method was refactored to no longer call `gem`. Previously, our `Gemfile` set up depended on this. However, it was quite complicated in order to support the root `Gemfile` getting symlinkd into each gem subdirectory. I've simplified things here: - `Gemfile-shared` now contains all dependencies that are not declared in the gemspecs. - `Gemfile` is now greatly simplified--it just evals `Gemfile-shared` and declares a dependency on each ElasticGraph gem. - `config/Gemfile-for-gem` contains a more complex gemfile, which gets symlinked into each ElasticGraph gem. - I've removed the last few unnecesary gemspec developemnt dependencies for non-ElasticGraph gems--we handle this through the development dependencies in `Gemfile-shared` instead. (`rack-test` was missing from the `Gemfile` before!) This new simpler setup should fix the issues we're having with dependabot.
882f28f to
91748a9
Compare
1 task
myronmarston
added a commit
that referenced
this pull request
Jul 8, 2025
This partially reverts "chore: rework Gemfiles. (#645)" (cce2474). It recombines the root `Gemfile` with `config/Gemfile-for-gem`, doing away with `Gemfile-shared`, while keeping the changes to #645 that impact how the root bundle works (e.g. calling `gem` with each ElasticGraph gem, rather than `gemspec`). This appears to be necessary for dependabot. While some dependabot runs have been successful since #645 was merged, the last few runs have failed with: ``` Handled error whilst updating rubocop-rake: dependency_file_not_supported {message: "{\"errors\":[{\"status\":400,\"title\":\"Bad Request\",\"detail\":\"The request contains invalid or unauthorized changes\"}]}"} ``` I think the problem is `Gemfile-shared`: it's non standard to put gem versions there, and dependabot seems to not like it. By reverting back to a single root `Gemfile` I'm hopeful it'll fix dependabot. In addition, I've reapplied "Increase the dependabot open-pull-request-limit. (#657)", effectively reverting (#659). That was a prior attempt at fixing dependabot which didn't work.
myronmarston
added a commit
that referenced
this pull request
Jul 9, 2025
This partially reverts "chore: rework Gemfiles. (#645)" (cce2474). It recombines the root `Gemfile` with `config/Gemfile-for-gem`, doing away with `Gemfile-shared`, while keeping the changes to #645 that impact how the root bundle works (e.g. calling `gem` with each ElasticGraph gem, rather than `gemspec`). This appears to be necessary for dependabot. While some dependabot runs have been successful since #645 was merged, the last few runs have failed with: ``` Handled error whilst updating rubocop-rake: dependency_file_not_supported {message: "{\"errors\":[{\"status\":400,\"title\":\"Bad Request\",\"detail\":\"The request contains invalid or unauthorized changes\"}]}"} ``` I think the problem is `Gemfile-shared`: it's non standard to put gem versions there, and dependabot seems to not like it. By reverting back to a single root `Gemfile` I'm hopeful it'll fix dependabot. In addition, I've reapplied "Increase the dependabot open-pull-request-limit. (#657)", effectively reverting (#659). That was a prior attempt at fixing dependabot which didn't work.
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.
Dependabot is currently broken for ElasticGraph:
dependabot/dependabot-core#12426
Troubleshooting points to a root cause of Bundler 2.6.9 (used by the latest dependabot) having some subtle changes to how gemspecs are handled. Specifically, this PR:
ruby/rubygems#8480
In that PR, the
gemspecmethod was refactored to no longer callgem.Previously, our
Gemfileset up depended on this. However, it was quite complicated in order to support the rootGemfilegetting symlinkd into each gem subdirectory.I've simplified things here:
Gemfile-sharednow contains all dependencies that are not declared in the gemspecs.Gemfileis now greatly simplified--it just evalsGemfile-sharedand declares a dependency on each ElasticGraph gem.config/Gemfile-for-gemcontains a more complex gemfile, which gets symlinked into each ElasticGraph gem.Gemfile-sharedinstead. (rack-testwas missing from theGemfilebefore!)This new simpler setup should fix the issues we're having with dependabot.