-
Notifications
You must be signed in to change notification settings - Fork 135
Support ruby 3.4 #1510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support ruby 3.4 #1510
Conversation
💚 CLA has been signed |
dc48a36
to
2e69949
Compare
2e69949
to
fc3a0bf
Compare
Hi - Let me know if there is anything I can do to help move this along. Ruby 3.4.2 just came out and it would be awesome to see the elastic-apm library having support for it. Thanks! |
Elastic, it's been 57 days. Please respond on this thread so that those of us that depend on this gem either know you have intention to support or can make our own plans that allow us to upgrade while still using APM. |
It is unfortunate that lack of response on this thread has to be reasonably interpreted as Elastic has no plans to merge any time soon, and Ruby users should likely start vendoring/forking @gregawoods PR in order to continue safely into the future. |
I've merged in the latest changes from main and cleared up a small conflict. Would still love to see this accepted eventually, or really any formal acknowledgement in this space to show that it's on the road map. |
@colleenmcginnis @v1v @KOTungseth can someone respond to this from Elastic? |
Ruby 3.4.3 was recently released. As more and more folks start adopting 3.4 I’m sure it would be appreciated to see some feedback here. 🙂 |
@gregawoods Thanks a lot for this contribution! I'll work on getting a release out asap with ruby 3.4 support. |
Just a quick update @gregawoods: I need to update the tests so they pass on main and then we can rebase this so the tests can pass and it can be merged. I've opened a PR in which I'm working through the test failures. I hope it won't take too long :) |
Understood, thank you so much! |
hey again @gregawoods I've fixed the tests and merged the changes into main. Would you mind rebasing so we can see if the tests pass on Ruby 3.4? |
b74edca
to
ea08662
Compare
Done 👍 |
I've pushed up a handful of test fixes. Sidekiq changed their job wrapper class name, and ruby 3.4 dropped mutex_m from the standard library. Mongo just has some changes to white space in it's output. The failing rails 4 test may be more problematic. It looks like the correct thing to do may be to simply add an entry to exclude.yml. Edit: I added the exclusion, but happy to roll it back if that was the wrong call. |
Taking a look at the latest round of failures. This one complains about a missing symbol in sqlite3. I now see that we should probably be excluding the ruby-3.4/rails-5 combination (e.g. ruby-3.1/5-2 is already excluded), so I'll add that. The rest all look like this: #<Logger:0x19f9287a @level=1, @level_override={}, @logdev=nil, @default_formatter=#<Logger::Formatter:0x4924ad09 @datetime_format=nil>, @progname=nil, @formatter=nil> received :error with unexpected arguments
expected: (/OpenSSL::SSL::SSLError/)
got: ("[ElasticAPM] [THREAD:5116]: APM Server not responding in time, terminating request") The test points to let(:config) do
Config.new(server_url: 'https://self-signed.badssl.com')
end This feels to me like it could be related to the badssl.com service being temporarily flaky or returning bad responses. Do we think this requires some additional fixes here, or is this a "try it again" kind of situation? |
hey @gregawoods thank you so much for going through the test failures and adding some fixes and exclusions! I agree with excluding rails 5 from testing on ruby 3.4, that seems like an unlikely combo. Update: the json specs are failing because this change in the json gem creates two spans when Another update: I've fixed the failing json spec and merged the change into main. Would you mind rebasing? Thanks! |
82d4106
to
c598764
Compare
@estolfo Latest changes have been rebased in. Thanks! |
I don't know at a first glance what's up with those jruby failures, as they seem to have just started with no related functional changes to the code...I'll have to dig into it and will hopefully have an update soon. |
What does this pull request do?
This fixes the parsing of stack traces in the latest version of ruby.
Ruby 3.4 made a few changes to how traces are formatted:
These changes cause problems when the agent parses the string, which manifests as a validation error.
Why is it important?
This will block users of APM from upgrading to ruby 3.4.
Checklist
.rubocop.yml
)I have updated supported-technologies.asciidocAdded an API method or config option? Document in which version this will be introducedRelated issues