Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDTEST-756] remove monkey patch of core identity module #228

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading