[Ruby] Drop support for EOL Ruby 3.1 and clean up#41435
Conversation
Summary of ChangesHello @larouxn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the project's minimum supported Ruby version to 3.2, aligning with the end-of-life status of Ruby 3.1. This change ensures that the project maintains compatibility with actively supported Ruby versions and encourages users to upgrade to more recent, secure, and performant environments. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly updates the project to drop support for Ruby 3.1 by setting the minimum required Ruby version to 3.2. The changes are consistently applied across the gemspec, gemspec.template, and the README.md documentation. The modifications in the README also correctly update the installation instructions. The changes are accurate and align with the pull request's goal of maintaining support for active Ruby versions. As a follow-up, you might consider simplifying the have_ruby_abi_version method in src/ruby/ext/grpc/extconf.rb, as some of its logic becomes redundant with the new minimum Ruby version of 3.2.
f609825 to
8c7a69f
Compare
|
The Google policy/practice is to only drop 1 year after EOL I believe. See #39607 (comment) and #38515 (comment) (which is why I didn't drop it immediately with the ruby 4.0 cross compile support in #41324 ) https://github.com/google/oss-policies-info/blob/main/foundational-ruby-support-matrix.md https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions Next update is scheduled for 12 months from 3.1 EOL (March 26 2026) |
|
This is also missing some needed cleanup to the cross compile versions ( |
8c7a69f to
2e5a9a5
Compare
|
👋 Hey @chadlwilson, thanks for the info! I hadn't yet seen As for the missing cleanup, I have gone ahead and cleaned up everything relevant I could find. If something seems off please let me know or if you plan to tackle this in March and would rather we close this PR that's fine too. |
|
Ahh, no worries, will leave that decision on leaving the PR open to you/maintainers, but I suppose you could mark as draft for now to signal its pending state. Sadly there seem to be a lot of ancient/stale/irrelevant PRs open here as it is. 😔 It’ll need rebasing after 4.0 precompile support is merged (hopefully soon) and will likely attract conflicts over time and need some later rebases. I’m just an external contributor as well - so just sharing what I had learned from earlier interactions with the team re: Google’s policies. 👍 |
I did notice that's not in yet. For sure will need some rebase + merge conflict resolution after that and come March. Appreciate the infos. Let's go with marking this PR as a draft for now. |
|
The 4.0 update has been merged now, so you can probably rebase this in prep if you'd like 👍 |
2e5a9a5 to
906946e
Compare
Thanks for the heads up. Have rebased on |
|
Now that Ruby 4 support is in, marking as ready for review so we can hopefully get some eyes prior to March 26th. 🙏 |
|
Most of the possible issues will be with the tests on generic images which are done with the min Ruby version, which you've correctly bumped (I think). So it'll need test images to be rebuilt and pushed by a Googler and a change merged to expected hashes - which would then need to be redone as soon as any other changes to Dockerfiles are merged to master in the interim 2 months. So I suspect there might not be much enthusiasm for doing it so far out. But can try your luck! :) |
906946e to
8b0d806
Compare
|
@larouxn - just an FYI, normally you'd want to ping/assign @asheshvidyut and @zarinn3pal: I'm the Python TL, just happened to help sometimes with Ruby when those two are out. I don't mind helping, but I'm not always able to get to these tickets in a timely manner. |
|
I will take this forward from here. Thanks @larouxn and @chadlwilson for your contributions. |
|
Thanks for your work @asheshvidyut 🙏🏻 |
| RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" | ||
| RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" | ||
| RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.11' >> ~/.bashrc" | ||
| RUN /bin/bash -l -c "echo 'rvm --default use ruby-3.2.0' >> ~/.bashrc" |
There was a problem hiding this comment.
I wonder what the rationale is behind running tests using old, insecure, buggy ruby versions instead of latest patch release?
There was a problem hiding this comment.
Thanks for pointing it out. I will revert it. I got introduced by merge conf resolution.
There was a problem hiding this comment.
Ahh ok, I wondered if you were hitting some kind of bug 👍🏻


Proposing we drop support for Ruby 3.1 once it reaches 1 year EOL this coming March 26 2026.
References