Skip to content

Commit

Permalink
Merge branch 'master' into HEAD
Browse files Browse the repository at this point in the history
* master:
  DEBUG-2334 upgrade steep & rbs (DataDog#3950)
  [🤖] Update Latest Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/10976621387
  • Loading branch information
p committed Sep 25, 2024
2 parents c18b381 + a6b9175 commit ee5638d
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ end

group :check do
if RUBY_VERSION >= '3.0.0' && RUBY_PLATFORM != 'java'
gem 'rbs', '~> 3.2.0', require: false
gem 'steep', '~> 1.6.0', require: false
gem 'rbs', '~> 3.5.0', require: false
gem 'steep', '~> 1.7.0', require: false
end
gem 'ruby_memcheck', '>= 3' if RUBY_VERSION >= '3.4.0' && RUBY_PLATFORM != 'java'
gem 'standard', require: false
Expand Down
4 changes: 4 additions & 0 deletions Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ target :datadog do

ignore 'lib/datadog/appsec.rb'
ignore 'lib/datadog/appsec/component.rb'
# Excluded due to https://github.com/soutaro/steep/issues/1232
ignore 'lib/datadog/appsec/configuration/settings.rb'
ignore 'lib/datadog/appsec/contrib/'
ignore 'lib/datadog/appsec/contrib/auto_instrument.rb'
ignore 'lib/datadog/appsec/contrib/integration.rb'
Expand Down Expand Up @@ -69,6 +71,8 @@ target :datadog do
ignore 'lib/datadog/core/metrics/options.rb'
ignore 'lib/datadog/core/pin.rb'
ignore 'lib/datadog/core/rate_limiter.rb'
# steep fails in this file due to https://github.com/soutaro/steep/issues/1231
ignore 'lib/datadog/core/remote/tie.rb'
ignore 'lib/datadog/core/runtime/ext.rb'
ignore 'lib/datadog/core/runtime/metrics.rb'
ignore 'lib/datadog/core/transport/ext.rb'
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/jruby_9.2_elasticsearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/jruby_9.2_opensearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/ruby_2.5_elasticsearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion gemfiles/ruby_2.5_opensearch_latest.gemfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions lib/datadog/core/environment/execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def development?
# 2. Checking if `Net::HTTP` is referring to the original one
# => ::Net::HTTP.equal?(::WebMock::HttpLibAdapters::NetHttpAdapter::OriginalNetHTTP)
def webmock_enabled?
defined?(::WebMock::HttpLibAdapters::NetHttpAdapter) &&
!!(defined?(::WebMock::HttpLibAdapters::NetHttpAdapter) &&
defined?(::Net::HTTP) &&
::Net::HTTP.equal?(::WebMock::HttpLibAdapters::NetHttpAdapter.instance_variable_get(:@webMockNetHTTP))
::Net::HTTP.equal?(::WebMock::HttpLibAdapters::NetHttpAdapter.instance_variable_get(:@webMockNetHTTP)))
end

private
Expand Down Expand Up @@ -68,7 +68,7 @@ def minitest?

# Check if we are running from `bin/cucumber` or `cucumber/rake/task`.
def cucumber?
defined?(::Cucumber::Cli)
!!defined?(::Cucumber::Cli)
end

# If this is a Rails application, use different heuristics to detect
Expand All @@ -80,7 +80,7 @@ def rails_development?
# detecting its presence is enough to deduct if this is a development environment.
#
# @see https://github.com/rails/spring/blob/48b299348ace2188444489a0c216a6f3e9687281/README.md?plain=1#L204-L207
defined?(::Spring) || rails_env_development?
!!defined?(::Spring) || rails_env_development?
end

RAILS_ENV_DEVELOPMENT = Set['development', 'test'].freeze
Expand All @@ -94,7 +94,7 @@ def rails_development?
# it's common to have a custom "staging" environment, and such environment normally want to run as close
# to production as possible.
def rails_env_development?
defined?(::Rails.env) && RAILS_ENV_DEVELOPMENT.include?(::Rails.env)
!!defined?(::Rails.env) && RAILS_ENV_DEVELOPMENT.include?(::Rails.env)
end
end
end
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog/core/remote/tie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def self.boot
barrier = Datadog::Core::Remote.active_remote.barrier(:once)
end

# steep does not permit the next line due to
# https://github.com/soutaro/steep/issues/1231
Boot.new(barrier, t)
end
end
Expand Down
4 changes: 2 additions & 2 deletions sig/datadog/core/remote/tie.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ module Datadog
module Core
module Remote
module Tie
class Boot < ::Struct[untyped]
class Boot < ::Struct[[Component::Barrier, Numeric]]
def initialize: (Component::Barrier? barrier, Numeric? time) -> void

attr_reader barrier: Component::Barrier
attr_reader time: Numeric
end

def self.boot: () -> (nil | Boot)
def self.boot: () -> Boot?
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/core/telemetry/event.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module Datadog

def agent_transport: (untyped config) -> String

def conf_value: (String name, Object value, Integer seq_id, ?String origin) -> Hash[Symbol, untyped]
def conf_value: (String name, untyped value, Integer seq_id, ?String origin) -> Hash[Symbol, untyped]

def to_value: (Object value) -> Object

Expand Down

0 comments on commit ee5638d

Please sign in to comment.