Skip to content

[Backport][v1.78.x][Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support#41554

Merged
sergiitk merged 1 commit intogrpc:v1.78.xfrom
chadlwilson:backport-1-78-ruby-40-support
Feb 9, 2026
Merged

[Backport][v1.78.x][Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support#41554
sergiitk merged 1 commit intogrpc:v1.78.xfrom
chadlwilson:backport-1-78-ruby-40-support

Conversation

@chadlwilson
Copy link
Contributor

@chadlwilson chadlwilson commented Feb 4, 2026

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)

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)
@markbluhm
Copy link

@chadlwilson just a heads up it looks like 1.78 had a tag 5day ago and just got a github release tag 1hr ago
https://github.com/grpc/grpc/releases/tag/v1.78.0

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Feb 5, 2026

@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.

@sergiitk sergiitk requested a review from asheshvidyut February 5, 2026 17:13
@sergiitk sergiitk added kokoro:run release notes: yes Indicates if PR needs to be in release notes labels Feb 5, 2026
@sergiitk
Copy link
Member

sergiitk commented Feb 5, 2026

@asheshvidyut will take care of pushing the images.

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Feb 5, 2026

The testing images shouldn’t have changed from master, so if we have any luck things should just pass as is. 🙏🏻

@chadlwilson
Copy link
Contributor Author

Looks like the tests are clean, other than a timeout on the "Memory Usage Diff". 🙏

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

@adifsgaid
Copy link

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. 🙏

@chadlwilson
Copy link
Contributor Author

chadlwilson commented Feb 6, 2026

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 1.78.1 release plan - that part is a question for the Googlers. Right now there are no other commits/fixes pending on the branch and a single other open docs-related backport (that are publicly visible).

@sergiitk sergiitk changed the title [Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support (backport to 1.78.x) [Backport][v1.78.x][Ruby] Build/test ruby 4.0 and build native gems with Ruby 4.0 support Feb 9, 2026
@sergiitk sergiitk merged commit 704d68e into grpc:v1.78.x Feb 9, 2026
61 of 63 checks passed
@chadlwilson chadlwilson deleted the backport-1-78-ruby-40-support branch February 9, 2026 19:54
@kwent
Copy link

kwent commented Feb 13, 2026

Googlers please cut a 1.78.1 release or similar 🙏🏻

@asheshvidyut
Copy link
Member

1.78.1 release done.

@chadlwilson
Copy link
Contributor Author

Thank you @asheshvidyut 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bloat/none lang/ruby 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.

7 participants