Skip to content

[Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support#41324

Closed
chadlwilson wants to merge 6 commits intogrpc:masterfrom
chadlwilson:ruby-40
Closed

[Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support#41324
chadlwilson wants to merge 6 commits intogrpc:masterfrom
chadlwilson:ruby-40

Conversation

@chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Dec 30, 2025

  • 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

@chadlwilson chadlwilson force-pushed the ruby-40 branch 2 times, most recently from 6bc7833 to d0b0e30 Compare January 13, 2026 16:54
@chadlwilson chadlwilson marked this pull request as ready for review January 13, 2026 17:03
@chadlwilson chadlwilson requested a review from sergiitk as a code owner January 13, 2026 17:03
@chadlwilson

This comment was marked as resolved.

@asheshvidyut asheshvidyut changed the title [ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support [Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support Jan 16, 2026
@asheshvidyut
Copy link
Member

Thanks for the PR @chadlwilson . We will look into this.

@chadlwilson

This comment was marked as outdated.

@juan-apa
Copy link

great work on this, hoping to get this merged, because it is making my CI take 30+ minutes to just run bundle install on the ruby 4.0 upgrade PR 🙏

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Jan 22, 2026

Don’t get your hopes up too high. 😅 It’s very easy for things to get stuck, as it currently has been for 3 weeks.

I’ve worked on it the last few years (#38601 , #38615, #35399 , #35594 ) to try and shorten the cycle time from prior years, but it typically still takes weeks to months to get this supported every year, as the work can’t be done fully by OSS contributors like me, and is thus subject to Google’s internal priorities and release schedule.

If no Googler spends 30m building and pushing the testing images, it cannot even be tested to get initial feedback, which is where it has been stuck for 3 weeks now. Every trial+error change to the build/test/cross-compile images while resolving problems typically requires a googler to unblock it. To my knowledge there is no way to run tests on ones own fork CI as it uses Google’s internal proprietary build system. IIRC, some things are hard coded to use x64 base images so even running them locally is slow & unstable as I only have arm64 hardware available, so I typically can only run for 1 or 2 platforms (but all must pass to get this through)

Personally I typically don’t know the bindings or C++ well enough to solve any real issues that appear, I just help with the build infra logistics.

I also infer from commits that the biggest challenge may be that the primary maintainer of grpc-ruby (whom I’d probably built some marginal trust with that helped speed things up) appears to no longer work on grpc at Google, as last commits were in October - so imagine that will slow things down further.

@sergiitk sergiitk added the release notes: yes Indicates if PR needs to be in release notes label Jan 22, 2026
@sergiitk
Copy link
Member

sergiitk commented Jan 22, 2026

If no Googler spends 30m building and pushing the testing images, it cannot even be tested to get initial feedback, which is where it has been stuck for 3 weeks now.

Yes, sorry about that. Our (new) Ruby devs happen to be OOO at the moment. Tagging our new CI person to run the push_testing_images.sh - @yuanweiz.

@sergiitk
Copy link
Member

Oh, @yuanweiz is out today as well. I'll run the script for you.

@sergiitk
Copy link
Member

Please ignore the Sanity Checks (internal CI) until I push the images and corresponding commits.

@chadlwilson

This comment was marked as outdated.

@chadlwilson chadlwilson force-pushed the ruby-40 branch 2 times, most recently from 26369bb to 22da886 Compare January 23, 2026 05:36
@sergiitk
Copy link
Member

Hey - what was that force-push? Rebase? I asked to wait before I push my changes, sorry if I didn't made it clear enough.
I was running the scripts, and they generate changes I needed to commit to this branch.

I might need to force-push and override you changes.

@asheshvidyut
Copy link
Member

Thanks for this @chadlwilson I just have couple of questions before we move ahead. Really appreciate the work.

@chadlwilson
Copy link
Contributor Author

Thanks for this @chadlwilson I just have couple of questions before we move ahead. Really appreciate the work.

Thanks @asheshvidyut - have responded to those now. I note there is a feedback/copybara error (Google internal checks FAILED for runs...) in the checks I cannot see the details of, so let me know if that's something I need to address somehow.

Copy link
Member

@asheshvidyut asheshvidyut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kwent
Copy link

kwent commented Jan 29, 2026

What's next ?

@chadlwilson
Copy link
Contributor Author

What's next ?

Probably needs a second internal Google approver before copybara can cherry-pick/squash it internally, and perhaps someone to share why feedback/copybara is failing, if it needs action.

Copy link
Member

@asheshvidyut asheshvidyut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

chadlwilson and others added 6 commits February 3, 2026 10:08
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Updates ruby-compiler-dock to `1.11.1` to bring Ruby 4.0 support.

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@asheshvidyut
Copy link
Member

Update - I am trying to merge this, I was getting some merge conflicts.

Will sync with @sergiitk on this today.

@chadlwilson
Copy link
Contributor Author

Update - I am trying to merge this, I was getting some merge conflicts.

@asheshvidyut Oh? I guess merge conflicts for things at internal google not yet pushed to public, as I have been checking and couldn't see any?

@asheshvidyut
Copy link
Member

Update - I am trying to merge this, I was getting some merge conflicts.

@asheshvidyut Oh? I guess merge conflicts for things at internal google not yet pushed to public, as I have been checking and couldn't see any?

Yes.

@chadlwilson
Copy link
Contributor Author

@asheshvidyut OK, thx. Lemme know if you need any help!

@copybara-service copybara-service bot closed this in 7e3a37d Feb 4, 2026
@chadlwilson chadlwilson deleted the ruby-40 branch February 4, 2026 06:30
chadlwilson added a commit to chadlwilson/grpc that referenced this pull request Feb 4, 2026
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
Copy link
Contributor Author

@asheshvidyut Since 1.78 is seemingly still in pre-release (and we did not get a 1.77 Ruby release at all), opened a cherry pick PR at #41554 - otherwise I imagine we could be waiting quite some time for 1.79. No conflicts were necessary to resolve.

@bai
Copy link

bai commented Feb 6, 2026

Looks like grpc 1.78 gems were published to https://rubygems.org/gems/grpc/versions/1.78.0-x86_64-linux-gnu with >= 3.1, < 3.5.dev ruby version constraints? 🤔

@asheshvidyut
Copy link
Member

I guess, the branch cut was done before.

#41554 (comment)

@chadlwilson
Copy link
Contributor Author

master is on 1.79. Backport is required, so 1.78.1 earliest. See #41554

sergiitk pushed a commit that referenced this pull request Feb 9, 2026
…ith Ruby 4.0 support (#41554)

Backport of #41324 to v1.78.x.
---

- 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

(cherry picked from commit 7e3a37d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants