-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Lock gems that fail to install on certain Ruby versions #2366
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
Conversation
It's like a house of cards.
It also happens quite randomly. This time Ruby 2.4 build broke, but not 2.3 nor 2.2. Another thing that I've noticed is that Ruby version constraints for some gems differ when you check them on https://rubygems.org/gems//versions/ and then you check it with Any newly released gem with a Ruby version constraint can break our build. Do you think those problems are worth Bundler core team attention? |
539a67d
to
db78f3c
Compare
359779f
to
3fd46cf
Compare
Builds are green. I'm going to delete all repository caches, squash the commits and see if the builds are still green. |
3fd46cf
to
a855b26
Compare
@@ -26,20 +26,29 @@ | |||
gsub_file "Gemfile", /.*gem..sqlite3.*/, "gem 'sqlite3', '~> 1.3.6'" | |||
gsub_file "Gemfile", /.*bootsnap.*/, "" | |||
|
|||
if Rails::VERSION::STRING >= '5.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave this, we're still soft supporting 4.2 and this makes it tricky to properly install locally.
Sprockets 4.0 depend on Ruby >= 2.5 https://rubygems.org/gems/sprockets/versions/4.0.0 This results in build failures (https://travis-ci.org/github/rspec/rspec-rails/jobs/713253057): Installing sprockets 4.0.2 Gem::RuntimeRequirementNotMetError: sprockets requires Ruby version >= 2.5.0. The current ruby version is 2.4.10.364. Surprisingly, Ruby 2.3.8 and Ruby 2.2.10 builds don't fail, and install sprockets 3.7.2. Other failures follow: Gem::RuntimeRequirementNotMetError: capybara requires Ruby version >= 2.5.0. The current ruby version is 2.4.10.364. An error occurred while installing capybara (3.33.0), and Bundler cannot continue. Make sure that `gem install capybara -v '3.33.0' --source 'https://rubygems.org/'` succeeds before bundling. Gem::RuntimeRequirementNotMetError: childprocess requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing childprocess (3.0.0), and Bundler cannot continue. Make sure that `gem install childprocess -v '3.0.0' --source Gem::RuntimeRequirementNotMetError: nio4r requires Ruby version >= 2.3. The current ruby version is 2.2.0. An error occurred while installing nio4r (2.5.2), and Bundler cannot continue. Make sure that `gem install nio4r -v '2.5.2' --source 'https://rubygems.org/'` succeeds before bundling. Gem::RuntimeRequirementNotMetError: rack requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing rack (2.2.3), and Bundler cannot continue. Make sure that `gem install rack -v '2.2.3' --source 'https://rubygems.org/'` succeeds before bundling. Gem::RuntimeRequirementNotMetError: i18n requires Ruby version >= 2.3.0. The current ruby version is 2.2.0. An error occurred while installing i18n (1.8.5), and Bundler cannot continue. Make sure that `gem install i18n -v '1.8.5' --source 'https://rubygems.org/'` succeeds before bundling. We always generate example apps for >= 5.0.0 (4.2 is not in the matrix), hence the removal of a condition. This is a forgotten forward-port from https://github.com/rspec/rspec-rails/pull/2360/files#diff-8c3955be04b733dbd31e54e50844fb84R31
a855b26
to
8bc3f80
Compare
👍 Merge on green. |
Maybe @deivid-rodriguez have an idea? 🙂 |
This is green, but the question still remains.
Question: Is it Bundler that is unable to reduce the dependency considering the Ruby version constraint? Or should we look into what Travis' intermediate gem server is providing us with broken gem metadata? The following versions of RubyGems/Bundler are used:
|
Hi! Thanks for letting me know. This is indeed an issue with I think we had relaxed the limits on the server side to minimize these issues, but the right fix is that |
Thanks a lot @deivid-rodriguez, this makes total sense! |
No problem, and apologies for the trouble. We'll try to fix this. |
Ooooh good to know! Thank you very much!
…On August 1, 2020 12:16:15 PM GMT+02:00, "David Rodríguez" ***@***.***> wrote:
Hi! Thanks for letting me know.
This is indeed an issue with `bundler`. A long time ago, bundler used a
dependency API that didn't have `required_ruby_version` information.
These days bundler uses a better API that _does_ provide
`required_ruby_version` information. However, under some circumstances,
specifically, when the client is rate limited by rubygems.org because
of too many concurrent requests, we still end up falling back to using
the old API, causing this kind of intermittent problems.
I think we had relaxed the limits on the server side to minimize these
issues, but the right fix is that `bundler` completely stops using the
old API and instead waits a bit before retrying the new API again when
being rate limited. This fix is being tracked at
rubygems/rubygems#3594.
--
You are receiving this because your review was requested.
Reply to this email directly or view it on GitHub:
#2366 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Hei! Discussing this internally, this might actually not be due to rate limiting but to a different error condition. Bundler should log the exception that's causing the fallback to the old API in |
@deivid-rodriguez Awesome! Just to confirm that we're still experiencing the issue there's a similar failure from another build for a branch where:
is supposedly set, and the failure is:
|
Lock gems that fail to install on certain Ruby versions
@deivid-rodriguez Ping. Is this of any help? |
@deivid-rodriguez Ping. Can I provide anything else to help to pinpoint the issue? |
@deivid-rodriguez Ping. |
Hi @pirj, sorry for the delay, I was on holidays and for the first time in years I succeeded on fully disconnecting 😅. Your logs are super useful, they show a In any case, I'm catching up with stuff now, but this is definitely a priority for me once I'm done with the catching up 👍. |
@deivid-rodriguez no worries, I was only afraid this will slip through the cracks. Not rushing in any way. It's actually a great achievement, I admire it. Also jealous knowing that I won't able to fight the temptation to at least check and reply to mail during my upcoming vacation. Great! Just let me know if you need any additional information. Again, no rush, and no pressure. Thanks for taking care of that. |
I used a trick that turned out to be very effective: I left my laptop and passwords at home, to completely eliminate the temptation 😄
I will keep you posted! |
This should no longer be an issue. I ran build on the same commit and it is passing https://travis-ci.com/github/sonalkr132/rspec-rails/jobs/379918197
this was probably an intermittent error and bundler continued with retry. |
Oh, right! This was fixed by backfilling those, I forgot about it! |
Bundler fails to install several gems. It seems that Ruby version constraint is ignored.
E.g. Sprockets 4.0 depend on Ruby >= 2.5 https://rubygems.org/gems/sprockets/versions/4.0.0
This results in build failures (https://travis-ci.org/github/rspec/rspec-rails/jobs/713253057):
Surprisingly, Ruby 2.3.8 and Ruby 2.2.10 builds don't fail, and install sprockets 3.7.2.
This is a forgotten forward-port from https://github.com/rspec/rspec-rails/pull/2360/files#diff-8c3955be04b733dbd31e54e50844fb84R31