[Backport][v1.78.x][Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support#41554
Conversation
grpc#41324) - Run CI and normal specs with Ruby 4.0.1 - Updates ruby-compiler-dock to `1.11.1` to bring Ruby 4.0 cross compile support. - updates Rubocop and resolves latent warnings since update is needed for compatibility to avoid runtime warnings on modern Ruby - Adds missing `syslog` development dependency to resolve nag on more recent Ruby versions where it has moved to a bundled gem, rather than default gem as in `<= 3.3` - Weakens a single test assertion for bidi servers since `.inspect` of certain Ruby errors (e.g `NoMethodError`) serialize differently in `4.0` onwards Closes grpc#41324 PiperOrigin-RevId: 865208597 (cherry picked from commit 7e3a37d)
|
@chadlwilson just a heads up it looks like 1.78 had a tag 5day ago and just got a github release tag 1hr ago |
|
@markbluhm ahh ok, thanks. Well, I'll see if maintainers are open to merging this anyway since we are already 6 weeks after the Ruby 4 release without a pre compiled gem version. In some previous releases we have backported new Ruby version precompiled gems in into a .x patch release, so it's not unprecedented. |
|
@asheshvidyut will take care of pushing the images. |
|
The testing images shouldn’t have changed from master, so if we have any luck things should just pass as is. 🙏🏻 |
|
Looks like the tests are clean, other than a timeout on the "Memory Usage Diff". 🙏 |
|
Thanks for pushing this forward @chadlwilson — we've been planing the upgrade of Ruby 4.0.1 in production and the source compilation of grpc adds ~5-9 minutes to our Docker builds since there are no precompiled native gems for Ruby 4.0. We're currently working around it with GRPC_RUBY_BUILD_SYSTEM_GRPC=1 linking against system libgrpc in our base image, but it's not ideal and doesn't help CI where we don't control the build environment. The 2 failing checks (Bazel RBE Windows Debug, Memory Usage Diff) look unrelated to Ruby — any idea on the timeline for merge and a 1.78.1 release? Would love to drop the workaround. 🙏 |
Yeah, they are unrelated flakes. Just needs a second approval from a Googler. As for |
|
Googlers please cut a |
|
|
|
Thank you @asheshvidyut 🙏 |
Backport of #41324 to v1.78.x.
1.11.1to bring Ruby 4.0 cross compile support.syslogdevelopment dependency to resolve nag on more recent Ruby versions where it has moved to a bundled gem, rather than default gem as in<= 3.3.inspectof certain Ruby errors (e.gNoMethodError) serialize differently in4.0onwards(cherry picked from commit 7e3a37d)