-
Notifications
You must be signed in to change notification settings - Fork 248
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
feat: Version Compatibility Based on Gem Specs #1025
feat: Version Compatibility Based on Gem Specs #1025
Conversation
917817a
to
10a0eda
Compare
This changes provides instrumentation authors the ability to use gem specifications for version compatability checks instead of having to write a custom compatability block. In order to take advantage of this feature instrumentation authors must: 1. Declare the library and version constraints as a development dependency 2. Use instrumentation naming conventions e.g. `opentelemetry-instrumentation-ruby_kafka` Related https://github.com/open-telemetry/opentelemetry-ruby/issues/988
When gems are not found `Gem::Specification#find_by_name` raise exceptions. https://docs.seattlerb.org/rubygems/Gem/Specification.html#method-c-find_by_name
1f80352
to
82ca716
Compare
Ping @open-telemetry/ruby-maintainers @open-telemetry/ruby-approvers 🙏 |
@arielvalentin My two cents is i think this looks great and is an improvement on the current system. It feels _ a little_ hacky to me to rely on development dependancies in a gemspec, for something like an instrumentation that doesn't necessarily need to be packaged as a gem to begin with, but since this doesn't override the compatible block, but only acts as a useful fallback/default, I don't see the harm. that being said I'd like some other folks to chime in here, I brought this up in the SIG, would be keen to hear other POVs here. |
@ericmustin I would think folks that are writing their own auto-instrumentation that are not packaged as a gem are likely either implemented first party or patched in their applications. It's likely they are aware what the compatibility requirements are in their own projects or may not be using instrumentation at all. Could you elaborate a bit on what you think makes it a little hacky? |
I don't think that checking development dependancies in a gemspec from production code is a common convention. Maybe hacky isn't the right term. That being said I think it's fine imo, just, unusual. Again i'd like some other input here from @open-telemetry/ruby-maintainers @open-telemetry/ruby-approvers |
ea1c911
to
45e53d9
Compare
@robertlaurin do you have any time this week to take a look? |
Closing per my offline conversation with @robertlaurin open-telemetry/opentelemetry-ruby-contrib#373 |
This changes provides instrumentation authors the ability to use gem specifications for version compatibility checks instead of having to write a custom compatibility block.
In order to take advantage of this feature instrumentation authors must:
opentelemetry-instrumentation-ruby_kafka
Related open-telemetry/opentelemetry-ruby-contrib#373
Some Concerns:
ruby-kafka
andactivesupport