Skip to content

Add support for jruby 10 #353

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

donoghuc
Copy link

As a consumer of the mongo gem I want to run using jruby 10.

This commit starts this work, before I get too deep in it I want to make sure i'm not duplicating effort or if this is even something that would get any buy-in.

I noticed the first issue eaa3a1d attempting to even load the mongo gem. I attempted to add jruby 10 cells in CI to see other places that need update 63bdd19.

Thanks for looking :)

donoghuc added 2 commits May 15, 2025 10:56
The `fastGetModule` is deprecated in jruby 9.4 and removed in 10:

https://github.com/jruby/jruby/blob/1611c8e4e464164474a0e8c0663e16d67fa5c268/core/src/main/java/org/jruby/Ruby.java#L1373-L1385

This commit uses the getModule method (which should bridge between 9 and 10).
Note that it is marked deprecated in 10 but having the 9/10 compatability will
be a win in the forseable future.

https://github.com/jruby/jruby/blob/02c56b6099582500f86262a1d16d6b0e5cf3fe95/core/src/main/java/org/jruby/Ruby.java#L1339-L1342
@donoghuc donoghuc requested a review from a team as a code owner May 15, 2025 18:04
@donoghuc donoghuc requested a review from jamis May 15, 2025 18:04
donoghuc added a commit to donoghuc/opentelemetry-ruby-contrib that referenced this pull request May 15, 2025
It looks like latest features (including jruby 10 enablement) will require the
latest minor release of the mongo gem.

Specifically:

The latest mongo gem relaxes the range for the ruby-bson gem. This would allow
the uptake of mongodb/bson-ruby#353 if it is accepted.
@alexbevi
Copy link
Contributor

Hey @donoghuc, our team had https://jira.mongodb.org/browse/RUBY-3651 on our plan for this quarter to review but haven't kicked that off yet.

No duplication of effort at this point, and we'd be happy to get another set of eyes on it

donoghuc added a commit to donoghuc/opentelemetry-ruby-contrib that referenced this pull request May 16, 2025
It looks like latest features (including jruby 10 enablement) will require the
latest minor release of the mongo gem.

Specifically:

The latest mongo gem relaxes the range for the ruby-bson gem. This would allow
the uptake of mongodb/bson-ruby#353 if it is accepted.
arielvalentin pushed a commit to open-telemetry/opentelemetry-ruby-contrib that referenced this pull request May 27, 2025
* Add less restrictive gem spec for mongo gem

It looks like latest features (including jruby 10 enablement) will require the
latest minor release of the mongo gem.

Specifically:

The latest mongo gem relaxes the range for the ruby-bson gem. This would allow
the uptake of mongodb/bson-ruby#353 if it is accepted.

* Update test expectations based on latest mongo gem

This commit updates the test expectation for an updated message string. The same
behavior is observbed, the message has just been updated.

This commit also updates construction of a test mongodb client with a newly
required value for auth_source when building a simple client.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants