Skip to content

[Ruby] Drop support for EOL Ruby 3.1 and clean up#41435

Closed
larouxn wants to merge 18 commits into
grpc:masterfrom
larouxn:drop_support_for_eol_ruby_3.1
Closed

[Ruby] Drop support for EOL Ruby 3.1 and clean up#41435
larouxn wants to merge 18 commits into
grpc:masterfrom
larouxn:drop_support_for_eol_ruby_3.1

Conversation

@larouxn
Copy link
Copy Markdown
Contributor

@larouxn larouxn commented Jan 17, 2026

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Jan 17, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

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

  • Ruby Version Support: The minimum required Ruby version has been updated from 3.1 to 3.2 in the project's gemspec files.
  • Documentation Update: Project documentation, specifically the README.md, has been revised to reflect the new minimum Ruby version requirement of 3.2+ for both prerequisites and build instructions.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Generative AI Prohibited Use Policy, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

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.

@larouxn larouxn force-pushed the drop_support_for_eol_ruby_3.1 branch from f609825 to 8c7a69f Compare January 17, 2026 04:03
@larouxn larouxn changed the title Drop support for EOL Ruby 3.1 Drop support for EOL Ruby 3.1 and clean up Jan 17, 2026
@chadlwilson
Copy link
Copy Markdown
Contributor

chadlwilson commented Jan 24, 2026

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)

@chadlwilson
Copy link
Copy Markdown
Contributor

chadlwilson commented Jan 24, 2026

This is also missing some needed cleanup to the cross compile versions (RUBY_CC_VERSIONS) and the test images, distrib test matrix and Bazel lock files.

@larouxn larouxn force-pushed the drop_support_for_eol_ruby_3.1 branch from 8c7a69f to 2e5a9a5 Compare January 24, 2026 15:59
@larouxn larouxn requested a review from sergiitk as a code owner January 24, 2026 15:59
@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Jan 24, 2026

👋 Hey @chadlwilson, thanks for the info! I hadn't yet seen foundational-ruby-support-matrix.md nor that supported-ruby-versions page. Good call out. We indeed should not merge this or anything like it until March 26. 👍

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.

@chadlwilson
Copy link
Copy Markdown
Contributor

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

@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Jan 24, 2026

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

@larouxn larouxn changed the title Drop support for EOL Ruby 3.1 and clean up [Paused until March 26] Drop support for EOL Ruby 3.1 and clean up Jan 24, 2026
@larouxn larouxn marked this pull request as draft January 24, 2026 17:03
@chadlwilson
Copy link
Copy Markdown
Contributor

The 4.0 update has been merged now, so you can probably rebase this in prep if you'd like 👍

@larouxn larouxn force-pushed the drop_support_for_eol_ruby_3.1 branch from 2e5a9a5 to 906946e Compare February 4, 2026 16:14
@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Feb 4, 2026

The 4.0 update has been merged now, so you can probably rebase this in prep if you'd like 👍

Thanks for the heads up. Have rebased on master. Should be good come March 26th. 🙌

@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Feb 4, 2026

Now that Ruby 4 support is in, marking as ready for review so we can hopefully get some eyes prior to March 26th. 🙏

@larouxn larouxn changed the title [Paused until March 26] Drop support for EOL Ruby 3.1 and clean up Drop support for EOL Ruby 3.1 and clean up Feb 4, 2026
@larouxn larouxn marked this pull request as ready for review February 4, 2026 18:20
@chadlwilson
Copy link
Copy Markdown
Contributor

chadlwilson commented Feb 4, 2026

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! :)

@larouxn larouxn force-pushed the drop_support_for_eol_ruby_3.1 branch from 906946e to 8b0d806 Compare February 14, 2026 17:02
@sergiitk sergiitk requested review from asheshvidyut and zarinn3pal and removed request for sergiitk February 19, 2026 17:29
@sergiitk
Copy link
Copy Markdown
Member

sergiitk commented Feb 19, 2026

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

@larouxn
Copy link
Copy Markdown
Contributor Author

larouxn commented Feb 19, 2026

👋 Hey @sergiitk, super appreciate you tagging in the correct people. Thanks! 🙏

One quick note though, GitHub says I requested your review but that was actually done automatically via codeowners. I don't have the ability/permission to do anything with reviewers in this repo. 😅

/tools/dockerfile/** @sergiitk

image image

@asheshvidyut
Copy link
Copy Markdown
Member

I will take this forward from here.

Thanks @larouxn and @chadlwilson for your contributions.

@chadlwilson
Copy link
Copy Markdown
Contributor

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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder what the rationale is behind running tests using old, insecure, buggy ruby versions instead of latest patch release?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for pointing it out. I will revert it. I got introduced by merge conf resolution.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ahh ok, I wondered if you were hitting some kind of bug 👍🏻

@copybara-service copybara-service Bot closed this in 61b93b0 May 4, 2026
@larouxn larouxn deleted the drop_support_for_eol_ruby_3.1 branch May 4, 2026 10:48
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.

6 participants