Project

General

Profile

Actions

Bug #21301

closed

Mark ruby SDK 2.7.x as incompatible with Ruby 3

Added by Peter Amstutz 11 months ago. Updated 10 months ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Story points:
-
Release relationship:
Auto

Description

2023-12-14_19:21:23.47302 Error: uninitialized constant Random::DEFAULT
2023-12-14_19:21:23.47304 /var/lib/arvados-arvbox/.gem/gems/arvados-2.7.1/lib/arvados.rb:24:in `execute'
2023-12-14_19:21:23.47305 /var/lib/arvados-arvbox/.gem/gems/arvados-2.7.1/lib/arvados.rb:231:in `api_exec'
2023-12-14_19:21:23.47305 /var/lib/arvados-arvbox/.gem/gems/arvados-2.7.1/lib/arvados.rb:100:in `block (4 levels) in initialize'
2023-12-14_19:21:23.47305 /usr/src/arvados/services/login-sync/bin/arvados-login-sync:88:in `<top (required)>'
2023-12-14_19:21:23.47306 /usr/src/arvados/services/login-sync/binstubs/arvados-login-sync:27:in `load'
2023-12-14_19:21:23.47306 /usr/src/arvados/services/login-sync/binstubs/arvados-login-sync:27:in `<main>'

This issue comes about because 2.7 is not compatible with Ruby 3. We should update the 2.7 SDK so that it will refuse to run on Ruby 3.


Subtasks 1 (0 open1 closed)

Task #21334: Review 21301-ruby3-incompatResolvedTom Clegg01/04/2024Actions
Actions #1

Updated by Peter Amstutz 11 months ago

  • Description updated (diff)
  • Subject changed from Error: uninitialized constant Random::DEFAULT in Ruby SDK to Error: uninitialized constant Random::DEFAULTin Ruby SDK
Actions #2

Updated by Peter Amstutz 11 months ago

  • Subject changed from Error: uninitialized constant Random::DEFAULTin Ruby SDK to Error: uninitialized constant Random::DEFAULT in Ruby SDK

Ruby 2.7.0 the require 'random' doesn't work ???

run-tests-sdk-python-ruby: #3423

Trying to run this locally in arvbox:

======= install env
Traceback (most recent call last):
  File "/var/lib/arvados-arvbox/test/VENV3DIR/bin/pip3", line 6, in <module>
    from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip'
Traceback (most recent call last):
  File "/usr/src/arvados/sdk/python/setup.py", line 12, in <module>
    from setuptools import setup, find_packages
ModuleNotFoundError: No module named 'setuptools'
Leaving behind temp dirs in /var/lib/arvados-arvbox/test
Fatal: installing Python SDK and related dependencies failed (encountered in install_env at /usr/src/arvados/build/run-tests.sh line 645)
Actions #3

Updated by Tom Clegg 11 months ago

I think this means you're running Ruby 3, which is not supported by 2.7.1 because it does not have 20846-ruby3-compat (merged to main in 525e81bdbe18ea369f5a61a713e743608bab2e42).

The Random::DEFAULT usage was fixed in 7435f58364e90b8bf75db21602592ff0e7559b48.

Actions #4

Updated by Peter Amstutz 11 months ago

  • Description updated (diff)
Actions #5

Updated by Peter Amstutz 11 months ago

  • Assigned To set to Tom Clegg
Actions #6

Updated by Tom Clegg 11 months ago

  • Subject changed from Error: uninitialized constant Random::DEFAULT in Ruby SDK to Mark ruby SDK 2.7.x as incompatible with Ruby 3
Actions #7

Updated by Tom Clegg 11 months ago

21301-ruby3-incompat @ d5960563ba1aef727c64a0dff04da1adfed454c3 -- developer-run-tests: #3981

Also cherry-picked ae4cf50d72adebc6df338ef54ec5f2755ad73b8f to avoid deadlock in services/fuse tests.

Is 2.7-release the right branch to merge this to?

The syntax might look suspicious, but it is documented and it does work:

Fetching gem metadata from https://rubygems.org/......
Resolving dependencies...
Could not find compatible versions

Because every version of arvados depends on Ruby >= 1.8.7, < 3
  and Gemfile depends on arvados >= 0,
  Ruby >= 1.8.7, < 3 is required.
So, because current Ruby version is = 3.2.2,
  version solving has failed.
Actions #8

Updated by Tom Clegg 11 months ago

  • Status changed from New to In Progress
Actions #9

Updated by Brett Smith 11 months ago

Tom Clegg wrote in #note-7:

Is 2.7-release the right branch to merge this to?

I'm not sure whether it's -release or -staging, I think that's a Peter question. But whichever one is right, and not main, this is good to merge, thanks.

Actions #10

Updated by Peter Amstutz 11 months ago

Brett Smith wrote in #note-9:

Tom Clegg wrote in #note-7:

Is 2.7-release the right branch to merge this to?

I'm not sure whether it's -release or -staging, I think that's a Peter question. But whichever one is right, and not main, this is good to merge, thanks.

It should go to -staging

Actions #11

Updated by Tom Clegg 11 months ago

  • Status changed from In Progress to Resolved
Actions #12

Updated by Peter Amstutz 10 months ago

  • Release set to 69
Actions

Also available in: Atom PDF