Skip to content

Commit

Permalink
remove monkey patch of core identity module
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Sep 3, 2024
1 parent c8cb890 commit 3d8c2ee
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 42 deletions.
5 changes: 0 additions & 5 deletions lib/datadog/ci/configuration/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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"
Expand Down Expand Up @@ -274,12 +273,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
Expand Down
20 changes: 0 additions & 20 deletions lib/datadog/ci/utils/identity.rb

This file was deleted.

13 changes: 0 additions & 13 deletions sig/datadog/ci/utils/identity.rbs

This file was deleted.

4 changes: 0 additions & 4 deletions spec/datadog/ci/configuration/components_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d8c2ee

Please sign in to comment.