opentelemetry-ruby
opentelemetry-ruby copied to clipboard
TruffleRuby builds failing on `main`
https://github.com/open-telemetry/opentelemetry-ruby/actions/runs/3838561094
Hello! I've just been alerted to this issue and I've begun looking into it. If you don't mind, please let us know about things like this on the TruffleRuby issue tracker. Alternatively, just ping me and I'll take care of opening the issue. We take compatibility pretty seriously.
All of the test failures look to be due to simplecov 0.22. It's possible there are other failures that are masked, but I think they're all working for me locally. We're caught up in an a bit of an an unfortunate sequence of events. simplecov requires some coordination from the VM in order to record coverage. The simplecov 0.22 release at the end of 2022 inadvertently broke on TruffleRuby because it started calling a method our adapter didn't support. Since TruffleRuby isn't in simplecov's CI, the issue wasn't caught before release. We've since added the missing method to our adapter and simplecov 0.22 works on TruffleRuby 23.0.0-dev. But, that obviously won't fix previous TruffleRuby releases, such as the 22.3.0 build that this project's CI is using.
The issue can be resolved in simplecov with a respond_to? call, which is the fix a community member submitted a PR a couple of days after the 0.22 release. But, the simplecov team hasn't been active since the release. We're hopeful they'll merge that and cut a new release. Likewise, we're hopeful they'll add TruffleRuby to their CI to help avoid these sorts of breakages in the future.
In the meanwhile, these tests should pass running with truffleruby-head in the setup-ruby action. I can appreciate not wanting to run CI with a dev build of a language, but it could suffice as a temporary measure. I'll redouble efforts to see if we can get a compatible simplecov released. Alternatively, I think a small monkeypatch that should get things going with TruffleRuby 22.3.0 as well.
What I have seen multiple gems do is stick to a previous release of simplecov, like 0.21.2, that's another possibility. E.g. https://github.com/notEthan/jsi/commit/35e9b5fbe3f485f58fffebd7ab6d395fabac9846
Hi @nirvdrum - thank you for taking a peek! We're a tiny bit stretched on this project at the moment, which is why we haven't really chased down any TruffleRuby issues. However, I'm working on our CI a little bit at the moment and I'll try to open issues on the TruffleRuby tracker for anything I can't figure out on my own.
I think we're okay with running truffleruby-head on our CI, if that fixes things up. I don't have a link handy, but I believe our policy on truffleruby support is "best effort" right now, and running truffleruby-head feels in line with the spirit of that policy. 😄
Ah, it looks like we worked around this by just not running simplecov unless we're on MRI Ruby. Maybe not the most elegant of workarounds, but fundamentally I'm not super upset at that kind of workaround: most ruby developers will run it as part of their local testing (because they're typically running MRI ruby), and anyone developing locally with truffleruby or jruby will get it as part of CI.
@ahayworth No problem. I struggled with a way to phrase that didn't sound like an admonish. You're, of course, under no obligation to donate your time to anyone. I really appreciate you taking a look at adding TruffleRuby to your CI in the first place. It was more to let you know that we're responsive and will dig into failing tests for you.
No hard feelings whatsoever; I didn't feel remotely admonished so I would say your efforts in that department were rather effective! 😄
At the moment, we currently do not test the OTLP exporters on truffleruby. I'm working through a PR to re-enable those, and the only problem I'm actually having is the (experimental, unreleased) GRPC exporter. I've been unable to install the grpc gem on truffleruby 22.2 and 22.3, on the version of grpc in the gemspec or on the latest upstream version. I could use a little assistance with that one - I poked around the issues and it looks like people were recently able to install this gem with truffleruby successfully.
That's the last exclusion for this repo, actually. We can move on to -contrib next, which may be more interesting. 🙃
👋 This issue has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this issue will be closed eventually by the stale bot.