Skip to content

Commit

Permalink
Merge pull request #142 from DataDog/anmarchenko/remove_instance_vari…
Browse files Browse the repository at this point in the history
…able_set2

remove temporary hack and use Core::Remote::Negotiation's new constructor param
  • Loading branch information
anmarchenko authored Mar 19, 2024
2 parents 48da95e + 5661a5c commit 7981912
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/datadog/ci/transport/api/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def self.build_agentless_api(settings)

def self.build_evp_proxy_api(settings)
agent_settings = Datadog::Core::Configuration::AgentSettingsResolver.call(settings)
negotiation = Datadog::Core::Remote::Negotiation.new(settings, agent_settings)

# temporary, remove this when patch will be accepted in Core to make logging configurable
negotiation.instance_variable_set(:@logged, {no_config_endpoint: true})
negotiation = Datadog::Core::Remote::Negotiation.new(
settings,
agent_settings,
suppress_logging: {no_config_endpoint: true}
)

evp_proxy_path_prefix = Ext::Transport::EVP_PROXY_PATH_PREFIXES.find do |path_prefix|
negotiation.endpoint?(path_prefix)
Expand Down
2 changes: 1 addition & 1 deletion vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Datadog
@transport_root: Datadog::Core::Remote::Transport::Negotiation::Transport
@logged: ::Hash[::Symbol, bool]

def initialize: (Datadog::Core::Configuration::Settings _settings, Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings agent_settings) -> void
def initialize: (Datadog::Core::Configuration::Settings _settings, Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings agent_settings, ?suppress_logging: ::Hash[::Symbol, bool]) -> void

def endpoint?: (::String path) -> bool

Expand Down

0 comments on commit 7981912

Please sign in to comment.