Bug #22712
closedArvados 3.1.0 gem dependencies incompatible with Ruby 2.7
Description
The error is:
The last version of securerandom (>= 0.3) to support your Ruby & RubyGems was 0.3.2. Try installing it with `gem install securerandom -v 0.3.2` and then running the current command again securerandom requires Ruby version >= 3.1.0. The current ruby version is 2.7.0.0.
Brett mentioned that we're already pinning it on RailsAPI, so the fix is trivial to implement.
In arvados-api-server
on Ubuntu 20.04, any bundle
task will fail like this:
Checking configuration for completeness...rake aborted! SyntaxError: /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods.rb:482: syntax error, unexpected (... ... def method_missing(name, ...) ... ^~~ /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods.rb:491: unexpected ... /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods.rb:495: syntax error, unexpected ')' ... return public_send(name, ...) ... ^ /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/attribute_methods.rb:551: syntax error, unexpected end-of-input, expecting `end' /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record.rb:128:in `require' /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record.rb:128:in `<module:ActiveRecord>' /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record.rb:38:in `<top (required)>' /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/railtie.rb:3:in `require' /var/www/arvados-api/shared/vendor_bundle/ruby/2.7.0/gems/activerecord-7.1.5.1/lib/active_record/railtie.rb:3:in `<top (required)>' /var/www/arvados-api/current/config/application.rb:11:in `require' /var/www/arvados-api/current/config/application.rb:11:in `<top (required)>' /var/www/arvados-api/current/Rakefile:9:in `require' /var/www/arvados-api/current/Rakefile:9:in `<top (required)>' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:58:in `load' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:58:in `kernel_load' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli/exec.rb:23:in `run' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli.rb:492:in `exec' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli.rb:34:in `dispatch' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/cli.rb:28:in `start' /var/lib/gems/2.7.0/gems/bundler-2.4.22/exe/bundle:37:in `block in <main>' /var/lib/gems/2.7.0/gems/bundler-2.4.22/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors' /var/lib/gems/2.7.0/gems/bundler-2.4.22/exe/bundle:29:in `<main>' (See full trace by running task with --trace) failed.
This is because of Rails issue 54276. We might be able to work around by downgrading to Rails 7.1.3.4 which does not have the offending code. Rails 7.1.5.1 includes a security update but it's for a feature we don't use so it's okay to pull back.
Updated by Peter Amstutz 5 days ago
- Target version changed from Development 2025-04-02 to Development 2025-04-16
Updated by Brett Smith 4 days ago
- Assigned To changed from Lucas Di Pentima to Brett Smith
I'm rolling this into a branch with other #22697 fixes.
Updated by Brett Smith 4 days ago
This will make a new release of arvados-google-api-client which is outside the normal release cycle but yeah.
Updated by Brett Smith 4 days ago
- Description updated (diff)
- Subject changed from arvados-cli 3.1.0 gem indirect dependency makes it impossible to install with Ruby 2.7 to Arvados 3.1.0 gem dependencies incompatible with Ruby 2.7
Updated by Brett Smith 4 days ago
22697-gem-downgrades @ 831b623e24f9ea273b5c484d5c1c9e45ede4d71d - developer-run-tests: #4720
- All agreed upon points are implemented / addressed.
- Addresses both known deficiencies, one per commit.
- Anything not implemented (discovered or discussed during work) has a follow-up story.
- N/A
- Code is tested and passing, both automated and manual, what manual testing was done is described
- The test above proves our code still works okay with 7.1.3.4. The real test will be test-provision-ubuntu2004, but trying to run that before we merge to main and publish packages is challenging and risky.
- Documentation has been updated.
- N/A
- Behaves appropriately at the intended scale (describe intended scale).
- N/A
- Considered backwards and forwards compatibility issues between client and server.
- N/A
- Follows our coding standards and GUI style guidelines.
- N/A
Updated by Brett Smith 3 days ago
I pushed a couple additional commits directly to main to pin ActiveSupport in other gems, same version and rationale as the Rails change in the branch. With those, test-provision is passing: test-provision-ubuntu2004: #1159