diff --git a/lib/datadog/ci/configuration/components.rb b/lib/datadog/ci/configuration/components.rb index 4db8d121..582a164d 100644 --- a/lib/datadog/ci/configuration/components.rb +++ b/lib/datadog/ci/configuration/components.rb @@ -20,7 +20,6 @@ require_relative "../test_visibility/transport" require_relative "../transport/adapters/telemetry_webmock_safe_adapter" require_relative "../transport/api/builder" -require_relative "../utils/identity" require_relative "../utils/parsing" require_relative "../utils/test_run" require_relative "../worker" @@ -285,12 +284,8 @@ def configure_telemetry(settings) settings.telemetry.shutdown_timeout_seconds = 60.0 begin - require "datadog/core/environment/identity" require "datadog/core/telemetry/http/adapters/net" - # patch gem's identity to report datadog-ci library version instead of datadog gem version - Core::Environment::Identity.include(CI::Utils::Identity) - # patch gem's telemetry transport layer to use Net::HTTP instead of WebMock's Net::HTTP Core::Telemetry::Http::Adapters::Net.include(CI::Transport::Adapters::TelemetryWebmockSafeAdapter) rescue => e diff --git a/lib/datadog/ci/utils/identity.rb b/lib/datadog/ci/utils/identity.rb deleted file mode 100644 index 6e8720b0..00000000 --- a/lib/datadog/ci/utils/identity.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -module Datadog - module CI - module Utils - module Identity - def self.included(base) - base.singleton_class.prepend(ClassMethods) - end - - module ClassMethods - # return datadog-ci gem version instead of datadog gem version - def gem_datadog_version - Datadog::CI::VERSION::STRING - end - end - end - end - end -end diff --git a/sig/datadog/ci/utils/identity.rbs b/sig/datadog/ci/utils/identity.rbs deleted file mode 100644 index 72a8b76e..00000000 --- a/sig/datadog/ci/utils/identity.rbs +++ /dev/null @@ -1,13 +0,0 @@ -module Datadog - module CI - module Utils - module Identity - def self.included: (untyped base) -> void - - module ClassMethods - def gem_datadog_version: () -> String - end - end - end - end -end diff --git a/spec/datadog/ci/configuration/components_spec.rb b/spec/datadog/ci/configuration/components_spec.rb index 15d5d15d..aa120a9c 100644 --- a/spec/datadog/ci/configuration/components_spec.rb +++ b/spec/datadog/ci/configuration/components_spec.rb @@ -159,10 +159,6 @@ expect(settings.telemetry).to have_received(:enabled=).with(true) end - it "patches Core::Environment::Identity module to replace the library version" do - expect(Datadog::Core::Environment::Identity.gem_datadog_version).to eq(Datadog::CI::VERSION::STRING) - end - it "patches Datadog::Core::Telemetry::Http::Adapters::Net" do expect(Datadog::Core::Telemetry::Http::Adapters::Net).to be < Datadog::CI::Transport::Adapters::TelemetryWebmockSafeAdapter end