test: remove ostruct dependency by updating rake to 13 for ruby 4#2016
test: remove ostruct dependency by updating rake to 13 for ruby 4#2016xuan-cao-swi wants to merge 12 commits intoopen-telemetry:mainfrom
Conversation
|
@xuan-cao-swi I know this is not ready for review but I think that https://github.com/search?q=repo%3Aopen-telemetry%2Fopentelemetry-ruby%20cgi&type=code If we do not want to add a transitive dependency on the |
|
ostruct on the other hand is a test only dependency: If we can find an alternative for OpenStruct I think that we should go for it. |
|
For replacement of cgi escape and unescape maybe using I just did test and found out if rake is 13.3, then no OpenStruct is required. I think old rake (13.1.0 and before) use OpenStruct. Currently most gemspec using rake ~> 12.0 (except log_sdk), maybe they can change to newer rake. |
|
Updated all rake to 13.3 for ruby 4. |
|
I do not know if they are functionally equivalent, e.g. of en irb(main):006> CGI.escape("*")
=> "%2A"
irb(main):007> URI.encode_www_form_component("*")
=> "*"
irb(main):008> URI.decode_www_form_component("%2A")
=> "*"
irb(main):010> CGI.unescape("*")
=> "*" |
|
It seems Decode seems aligned for asterisk. If we are ok with adding |
|
I think what we should do is consult the specification. Does it specify which to use? In inclined to keep this change but report it as potentially a breaking change. |
|
Based on the spec, baggage propagator and exporter protocol both use w3c baggage specification. Jaeger propagator will be deprecated. RFC 3986 is compatible with W3C Baggage specification. I think the most important consideration is to following Character Encoding guide Difference about space Difference about * (W3C Baggage allows both * and %2A for encoding *) |
|
Per our slack convo I think we agree that uri is the most correct per the spec. Let's use that and set this as a |
|
Actually how do you feel about splitting this or into separate ones. Have the URI fix in a separate PR from ostruct so it's more explicit |
exporter/otlp-logs/lib/opentelemetry/exporter/otlp/logs/logs_exporter.rb
Outdated
Show resolved
Hide resolved
|
|
||
| spec.add_dependency 'opentelemetry-api', '~> 1.0' | ||
|
|
||
| spec.add_development_dependency 'bundler', '>= 1.17' |
There was a problem hiding this comment.
Do we need to have bundler as a dependency?
There was a problem hiding this comment.
I guess it's left there by merge conflict. Removed 👍
Removed bundler as a development dependency.
…o update-test-for-ruby-4
arielvalentin
left a comment
There was a problem hiding this comment.
Approving assuming we merge the rubocop fixes first
…o update-test-for-ruby-4
Added cgi and ostruct gem since they are removed from ruby 4.
Also fixed some warning that is about constants reinitialization.