From 5661a5c138b42681ca8444f9d1479e3a3f303fa8 Mon Sep 17 00:00:00 2001 From: Andrey Marchenko Date: Mon, 18 Mar 2024 16:53:00 +0100 Subject: [PATCH] remove temporary hack and use Core::Remote::Negotiation's new constructor param --- lib/datadog/ci/transport/api/builder.rb | 9 +++++---- vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/datadog/ci/transport/api/builder.rb b/lib/datadog/ci/transport/api/builder.rb index fddc3002..8383b3a0 100644 --- a/lib/datadog/ci/transport/api/builder.rb +++ b/lib/datadog/ci/transport/api/builder.rb @@ -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) diff --git a/vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs b/vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs index 2beb34ac..feb8e186 100644 --- a/vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs +++ b/vendor/rbs/ddtrace/0/datadog/core/remote/negotiation.rbs @@ -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