Skip to content
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

[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6 #32089

Merged
merged 41 commits into from Jan 19, 2023

Conversation

apolcyn
Copy link
Contributor

@apolcyn apolcyn commented Jan 12, 2023

Ruby 3.2 came out at the end of 2022, and rake-compiler-dock just added support in 1.3.0. Ruby 2.6 is now EOL, so stop building pre-compiled targets for it.

Note:

@apolcyn apolcyn added release notes: yes Indicates if PR needs to be in release notes lang/ruby labels Jan 12, 2023
@apolcyn
Copy link
Contributor Author

apolcyn commented Jan 13, 2023

Currently macos unit tests are failing (where the ruby extension is built natively on the macos host i.e. not cross-compiled):

<internal:/Users/kbuilder/.rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require': dlopen(/Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc/grpc_c.bundle, 0x0009): tried: '/Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc/grpc_c.bundle' (not a mach-o file) - /Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc/grpc_c.bundle (LoadError)
	from <internal:/Users/kbuilder/.rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc/grpc.rb:22:in `<top (required)>'
	from /Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc.rb:19:in `require_relative'
	from /Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/lib/grpc.rb:19:in `<top (required)>'
	from <internal:/Users/kbuilder/.rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from <internal:/Users/kbuilder/.rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
	from /Volumes/BuildData/tmpfs/altsrc/github/grpc/workspace_ruby_macos_dbg_native/src/ruby/end2end/end2end_common.rb:24:in `<top (required)>'
	from src/ruby/end2end/client_memory_usage_test.rb:17:in `require_relative'
	from src/ruby/end2end/client_memory_usage_test.rb:17:in `<main>'

@apolcyn
Copy link
Contributor Author

apolcyn commented Jan 17, 2023

The no_native = false experiment caused distrib tests to fail:

+ bundle exec ./distribtest.rb
Success!
+ [[ binary == \s\o\u\r\c\e ]]
++ gem env
++ grep '\- INSTALLATION DIRECTORY'
++ awk '{ print $4 }'
+ INSTALLATION_DIR=/usr/local/rvm/gems/ruby-2.7.0
++ find /usr/local/rvm/gems/ruby-2.7.0 -name grpc_c.so
++ wc -l
+ [[ 5 == 0 ]]
++ find /usr/local/rvm/gems/ruby-2.7.0 -name grpc_c.so -exec ldd '{}' ';'
++ grep -c libruby
A grpc_c.so file in this binary gRPC package is dynamically linked to libruby.
+ LIBRUBY_DEPENDENCY_EXISTS=1
+ [[ 1 != 0 ]]
+ echo 'A grpc_c.so file in this binary gRPC package is dynamically linked to libruby.'
++ find /usr/local/rvm/gems/ruby-2.7.0 -name grpc_c.so -exec ldd '{}' ';'
++ grep -c 'not found'
+ DEPENDENCY_NOT_FOUND=1
+ [[ 1 != 0 ]]
+ echo 'A grpc_c.so file in this binary gRPC package has an non-portable dependency.'
+ '[' 1 '!=' 0 ']'
+ exit 1
A grpc_c.so file in this binary gRPC package has an non-portable dependency.
+ DOCKER_EXIT_CODE=1
+ '[' /tmpfs/src/github/grpc '!=' '' ']'
+ mkdir -p /tmpfs/src/github/grpc
+ cp -r /tmp/tmp.NOZGpssgMg/reports /tmpfs/src/github/grpc
+ '[' '' '!=' '' ']'
+ exit 1

2023-01-17 18:01:57,590 FAILED: distribtest.ruby_linux_x64_stretch_version_ruby_2_7_package_type_binary [ret=1, pid=242254, time=30.8sec]

@apolcyn
Copy link
Contributor Author

apolcyn commented Jan 17, 2023

The macos issue is not reproducible locally

@apolcyn apolcyn marked this pull request as ready for review January 19, 2023 20:44
@apolcyn apolcyn merged commit c1a4b52 into grpc:master Jan 19, 2023
apolcyn added a commit to apolcyn/grpc that referenced this pull request Jan 19, 2023
grpc#32089)

[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6
@copybara-service copybara-service bot added the imported Specifies if the PR has been imported to the internal repository label Jan 20, 2023
apolcyn added a commit that referenced this pull request Jan 20, 2023
#32089) (#32157)

[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6
@apolcyn
Copy link
Contributor Author

apolcyn commented Jan 24, 2023

@johnnyshields FYI this is available in 1.52.pre2 now

XuanWang-Amos pushed a commit to XuanWang-Amos/grpc that referenced this pull request May 1, 2023
grpc#32089)

[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6
wanlin31 pushed a commit that referenced this pull request May 18, 2023
#32089)

[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bloat/none imported Specifies if the PR has been imported to the internal repository lang/ruby per-call-memory/neutral per-channel-memory/neutral release notes: yes Indicates if PR needs to be in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants