Skip to content

Commit d49afc6

Browse files
committed
[SDTEST-3814] Disable SymDB upload in CI mode
1 parent 1cb1c3a commit d49afc6

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

lib/datadog/ci/configuration/components.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def shutdown!(replacement = nil)
8484
end
8585

8686
def activate_ci!(settings)
87+
# Symbol Database upload is not supported in CI mode. Older datadog versions do not expose this setting.
88+
settings.symbol_database.enabled = false if settings.respond_to?(:symbol_database)
89+
8790
unless settings.tracing.enabled
8891
Datadog.logger.error(
8992
"Test Optimization requires tracing to be enabled. Disabling Test Optimization. " \

spec/datadog/ci/configuration/components_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@
141141
context "is enabled" do
142142
let(:enabled) { true }
143143

144+
context "when DD_SYMBOL_DATABASE_UPLOAD_ENABLED is true" do
145+
around do |example|
146+
ClimateControl.modify("DD_SYMBOL_DATABASE_UPLOAD_ENABLED" => "true") { example.run }
147+
end
148+
149+
it "disables Symbol Database upload" do
150+
expect(settings.symbol_database.enabled).to be(false)
151+
end
152+
end
153+
144154
it "shuts down Test Optimization components before telemetry" do
145155
shutdown_order = []
146156
allow(components.test_impact_analysis).to receive(:shutdown!) { shutdown_order << :test_impact_analysis }
@@ -513,6 +523,16 @@
513523
let(:enabled) { false }
514524
let(:agentless_enabled) { false }
515525

526+
context "when DD_SYMBOL_DATABASE_UPLOAD_ENABLED is true" do
527+
around do |example|
528+
ClimateControl.modify("DD_SYMBOL_DATABASE_UPLOAD_ENABLED" => "true") { example.run }
529+
end
530+
531+
it "leaves Symbol Database upload enabled" do
532+
expect(settings.symbol_database.enabled).to be(true)
533+
end
534+
end
535+
516536
it do
517537
expect(settings.tracing.test_mode)
518538
.to_not have_received(:enabled=)

0 commit comments

Comments
 (0)