Skip to content

Relax required ruby version to support Ruby 4 - #1650

Merged
smith merged 7 commits into
elastic:mainfrom
vlado:ruby4
Jul 27, 2026
Merged

Relax required ruby version to support Ruby 4#1650
smith merged 7 commits into
elastic:mainfrom
vlado:ruby4

Conversation

@vlado

@vlado vlado commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What does this pull request do?

Ruby 4.0.0 was released in December, but elastic-apm currently caps required_ruby_version at < 4.0, so it can't be installed on Ruby 4.0 even though the agent is compatible. This PR lifts that cap and adds Ruby 4.0 to CI.

Why is it important?

Checklist

  • I have signed the Contributor License Agreement.
  • My code follows the style guidelines of this project (See .rubocop.yml)
  • I have rebased my changes on top of the latest main branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have made corresponding changes to the documentation
  • I have updated docs/release-notes/index.md
  • I have updated docs/reference/supported-technologies.md
  • Added an API method or config option? Document in which version this will be introduced

@smith
smith self-requested a review July 22, 2026 19:07
smith
smith previously approved these changes Jul 24, 2026
@smith smith mentioned this pull request Jul 24, 2026
@smith

smith commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@vlado thanks for adding this! Sorry for the delayed response. Looks like there are some CI failures related to gem versioning. I haven't looked into it yet but you should be able to look the action run to see what when wrong: https://github.com/elastic/apm-agent-ruby/actions/runs/28862730853/job/89545484006?pr=1650

@vlado

vlado commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @smith

I've fixed the exclusion config but looks like CI will not start without approval.

@smith

smith commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@vlado looks like a couple of the 4.0 ones failed: one because of SQLite and one missing benchmark?

@vlado

vlado commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@smith For Rails 4 and 5 sqlite3 gem is pinned to version that can not be installed for Ruby 4. benchmark was un-defaulted in Ruby 4.0. Rails 6.1's require "benchmark" without declaring it in its gemspec. Since both 5.2 and 6.1 are EOL and do not claim compatibility with Ruby 4 I think we can safely exclude them from the matrix.

@smith

smith commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

I think we can safely exclude them from the matrix.

@vlado Sounds good to me. If you push that change I can re-run and we should be good to merge.

@vlado

vlado commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

I think we can safely exclude them from the matrix.

@vlado Sounds good to me. If you push that change I can re-run and we should be good to merge.

@smith Change is pushed b78768f

Failing spec seems unrelated to my changes (Seems like Docker Hub outage)

@smith
smith enabled auto-merge (squash) July 27, 2026 16:37
@smith
smith merged commit 4ac97d8 into elastic:main Jul 27, 2026
57 checks passed
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.

2 participants