Skip to content

Commit 5ec6170

Browse files
authored
[Test Optimization] - Code refactor (#6709)
## Summary of changes https://datadoghq.atlassian.net/browse/SDTEST-1423 This PR introduces a complete refactor of the existing two classes: - CIVisibility.cs - IntelligentTestRunnerClient.cs Alsos rename the following classes: - TestOptimizationTracerManager.cs - TestOptimizationTracerManagerFactory.cs - TestOptimizationSettings.cs With the refactor the following changes were made: #### CIVisibility.cs - Removed the static CIVisibility class. - Added the following abstractions: - [x] ITestOptimization.cs - [x] ITestOptimizationHostInfo.cs - [x] ITestOptimizationTracerManagement.cs - [x] ITestOptimizationFeature.cs - [x] ITestOptimizationEarlyFlakeDetectionFeature.cs - [x] ITestOptimizationFlakyRetryFeature.cs - [x] ITestOptimizationImpactedTestsDetectionFeature.cs - [x] ITestOptimizationSkippableFeature.cs - Also added an implementation to the abstractions, and removed the static approach with a singleton, similar to the tracer class. #### IntelligentTestRunnerClient.cs - Removed the IntelligentTestRunnerClient.cs class - Added the following files: - [x] ITestOptimizationClient.cs : an abstraction for the http client for all test optimization transactions. - [x] NoopTestOptimizationClient.cs: a NoOp implementation of the client. - [x] CachedTestOptimizationClient.cs: a cache layer over an ITestOptimizationClient.cs - [x] TestOptimizationClient.cs: the default implementation partial class, this part handles the basic http operations with retries code. - [x] TestOptimizationClient.GetCommitsAsync.cs: the default implementation partial class, this part handles the GetCommitsAsync transaction. - [x] TestOptimizationClient.GetEarlyFlakeDetectionTestsAsync.cs: the default implementation partial class, this part handles the GetEarlyFlakeDetectionTestsAsync transaction. - [x] TestOptimizationClient.GetImpactedTestsDetectionFilesAsync.cs: the default implementation partial class, this part handles the GetImpactedTestsDetectionFilesAsync transaction. - [x] TestOptimizationClient.GetSettingsAsync.cs: the default implementation partial class, this part handles the GetSettingsAsync transaction. - [x] TestOptimizationClient.GetSkippableTestsAsync.cs: the default implementation partial class, this part handles the GetSkippableTestsAsync transaction. - [x] TestOptimizationClient.SendPackFilesAsync.cs: the default implementation partial class, this part handles the SendPackFilesAsync transaction. - [x] TestOptimizationClient.UploadRepositoryChangesAsync.cs: the default implementation partial class, this part handles the UploadRepositoryChangesAsync transaction. ## Reason for change The current code is already complex and hard to maintain, all features are included in only two classes. Before introducing more features in the product (KnownTests, FlakyTestManagement) we need to improve the existing code and make our life easier. ## Implementation details It's the same code sparse in different files with a better structure for both adding new features and testing. ## Test coverage Same tests must behave the same we are not looking for a change of the current behavior. ## Other details <!-- Fixes #{issue} --> <!-- ⚠️ Note: where possible, please obtain 2 approvals prior to merging. Unless CODEOWNERS specifies otherwise, for external teams it is typically best to have one review from a team member, and one review from apm-dotnet. Trivial changes do not require 2 reviews. -->
1 parent 91fb55b commit 5ec6170

File tree

112 files changed

+4053
-2911
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+4053
-2911
lines changed

tracer/build/_build/Build.Steps.cs

+9-7
Original file line numberDiff line numberDiff line change
@@ -2249,12 +2249,13 @@ string NormalizedPath(AbsolutePath ap)
22492249
new(@".*System.Threading.ThreadAbortException: Thread was being aborted\.", RegexOptions.Compiled),
22502250
new(@".*System.InvalidOperationException: Module Samples.Trimming.dll has no HINSTANCE.*", RegexOptions.Compiled),
22512251
// CI Visibility known errors
2252-
new (@".*The Git repository couldn't be automatically extracted.*", RegexOptions.Compiled),
2253-
new (@".*DD_GIT_REPOSITORY_URL is set with.*", RegexOptions.Compiled),
2254-
new (@".*The Git commit sha couldn't be automatically extracted.*", RegexOptions.Compiled),
2255-
new (@".*DD_GIT_COMMIT_SHA must be a full-length git SHA.*", RegexOptions.Compiled),
2256-
new (@".*Timeout occurred when flushing spans.*", RegexOptions.Compiled),
2257-
new (@".*ITR: .*", RegexOptions.Compiled),
2252+
new(@".*The Git repository couldn't be automatically extracted.*", RegexOptions.Compiled),
2253+
new(@".*DD_GIT_REPOSITORY_URL is set with.*", RegexOptions.Compiled),
2254+
new(@".*The Git commit sha couldn't be automatically extracted.*", RegexOptions.Compiled),
2255+
new(@".*DD_GIT_COMMIT_SHA must be a full-length git SHA.*", RegexOptions.Compiled),
2256+
new(@".*Timeout occurred when flushing spans.*", RegexOptions.Compiled),
2257+
new(@".*TestOptimization: .*", RegexOptions.Compiled),
2258+
new(@".*TestOptimizationClient: .*", RegexOptions.Compiled),
22582259
// This one is annoying but we _think_ due to a dodgy named pipes implementation, so ignoring for now
22592260
new(@".*An error occurred while sending data to the agent at \\\\\.\\pipe\\trace-.*The operation has timed out.*", RegexOptions.Compiled),
22602261
new(@".*An error occurred while sending data to the agent at \\\\\.\\pipe\\metrics-.*The operation has timed out.*", RegexOptions.Compiled),
@@ -2312,7 +2313,8 @@ string NormalizedPath(AbsolutePath ap)
23122313
knownPatterns.Add(new(@".*The Git commit sha couldn't be automatically extracted.*", RegexOptions.Compiled));
23132314
knownPatterns.Add(new(@".*DD_GIT_COMMIT_SHA must be a full-length git SHA.*", RegexOptions.Compiled));
23142315
knownPatterns.Add(new(@".*Timeout occurred when flushing spans.*", RegexOptions.Compiled));
2315-
knownPatterns.Add(new(@".*ITR: .*", RegexOptions.Compiled));
2316+
knownPatterns.Add(new(@".*TestOptimization: .*", RegexOptions.Compiled));
2317+
knownPatterns.Add(new(@".*TestOptimizationClient: .*", RegexOptions.Compiled));
23162318

23172319
CheckLogsForErrors(knownPatterns, allFilesMustExist: true, minLogLevel: LogLevel.Warning);
23182320
});

tracer/src/Datadog.Trace.BenchmarkDotNet/BenchmarkMetadata.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
33
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
44
// </copyright>
5+
56
#nullable enable
67

78
using System;
@@ -18,15 +19,15 @@ internal static class BenchmarkMetadata
1819
static BenchmarkMetadata()
1920
{
2021
MetadataByBenchmark = new();
21-
CIVisibility.InitializeFromManualInstrumentation();
22+
TestOptimization.Instance.InitializeFromManualInstrumentation();
2223
}
2324

2425
public static void GetIds(object key, out TraceId traceId, out ulong spanId)
2526
{
2627
var value = MetadataByBenchmark.GetOrAdd(key, @case => new());
2728
if (value.TraceId is null)
2829
{
29-
var useAllBits = CIVisibility.Settings.TracerSettings?.TraceId128BitGenerationEnabled ?? true;
30+
var useAllBits = TestOptimization.Instance.Settings.TracerSettings?.TraceId128BitGenerationEnabled ?? true;
3031
value.TraceId = RandomIdGenerator.Shared.NextTraceId(useAllBits);
3132
value.SpanId = RandomIdGenerator.Shared.NextSpanId(useAllBits);
3233
}

tracer/src/Datadog.Trace.BenchmarkDotNet/DatadogDiagnoser.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ private static void SetEnvironmentVariables(DiagnoserActionParameters parameters
301301
environment[profilerHeapEnabled] = "1";
302302
}
303303

304-
environment["DD_PROFILING_AGENTLESS"] = CIVisibility.Settings.Agentless ? "1" : "0";
304+
environment["DD_PROFILING_AGENTLESS"] = TestOptimization.Instance.Settings.Agentless ? "1" : "0";
305305
environment["DD_PROFILING_UPLOAD_PERIOD"] = "90";
306306
environment["DD_INTERNAL_PROFILING_SAMPLING_RATE"] = "1";
307307
environment["DD_INTERNAL_PROFILING_WALLTIME_THREADS_THRESHOLD"] = "64";

tracer/src/Datadog.Trace.Coverage.collector/AssemblyProcessor.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public AssemblyProcessor(string filePath, CoverageSettings settings, ICollectorL
6464
_settings = settings;
6565
_logger = logger ?? new ConsoleCollectorLogger();
6666
_assemblyFilePath = filePath ?? throw new ArgumentNullException(nameof(filePath));
67-
_enableJitOptimizations = settings.CIVisibility.CodeCoverageEnableJitOptimizations;
67+
_enableJitOptimizations = settings.TestOptimization.CodeCoverageEnableJitOptimizations;
6868
_coverageMode = CoverageMode.LineExecution;
69-
if (settings.CIVisibility.CodeCoverageMode is { Length: > 0 } strCodeCoverageMode)
69+
if (settings.TestOptimization.CodeCoverageMode is { Length: > 0 } strCodeCoverageMode)
7070
{
7171
if (Enum.TryParse<CoverageMode>(strCodeCoverageMode, ignoreCase: true, out var coverageMode))
7272
{
@@ -169,7 +169,7 @@ public unsafe void Process()
169169
{
170170
_logger.Debug($"Assembly: {FilePath} is signed.");
171171

172-
var snkFilePath = _settings.CIVisibility.CodeCoverageSnkFilePath;
172+
var snkFilePath = _settings.TestOptimization.CodeCoverageSnkFilePath;
173173
_logger.Debug($"Assembly: {FilePath} loading .snk file: {snkFilePath}.");
174174
if (!string.IsNullOrWhiteSpace(snkFilePath) && File.Exists(snkFilePath))
175175
{

tracer/src/Datadog.Trace.Coverage.collector/CoverageSettings.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ namespace Datadog.Trace.Coverage.Collector;
1515
/// </summary>
1616
internal class CoverageSettings
1717
{
18-
public CoverageSettings(XmlElement? configurationElement, string? tracerHome, CIVisibilitySettings? ciVisibilitySettings = null)
18+
public CoverageSettings(XmlElement? configurationElement, string? tracerHome, TestOptimizationSettings? testOptimizationSettings = null)
1919
{
2020
TracerHome = tracerHome;
21-
CIVisibility = ciVisibilitySettings ?? CIVisibilitySettings.FromDefaultSources();
21+
TestOptimization = testOptimizationSettings ?? TestOptimizationSettings.FromDefaultSources();
2222

2323
if (configurationElement is not null)
2424
{
@@ -43,7 +43,7 @@ public CoverageSettings(XmlElement? configurationElement, string? tracerHome, CI
4343
}
4444

4545
public CoverageSettings(XmlElement? configurationElement)
46-
: this(configurationElement, Util.EnvironmentHelpers.GetEnvironmentVariable("DD_DOTNET_TRACER_HOME"), CIVisibilitySettings.FromDefaultSources())
46+
: this(configurationElement, Util.EnvironmentHelpers.GetEnvironmentVariable("DD_DOTNET_TRACER_HOME"), TestOptimizationSettings.FromDefaultSources())
4747
{
4848
}
4949

@@ -70,7 +70,7 @@ public CoverageSettings(XmlElement? configurationElement)
7070
/// <summary>
7171
/// Gets the CI Visibility settings
7272
/// </summary>
73-
public CIVisibilitySettings CIVisibility { get; }
73+
public TestOptimizationSettings TestOptimization { get; }
7474

7575
private static void GetStringArrayFromXmlElement(XmlElement? xmlElement, ref IReadOnlyList<string> elements, Func<string?, bool>? validator = null)
7676
{

tracer/src/Datadog.Trace.MSBuild/DatadogLogger.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ static DatadogLogger()
4747
// .
4848
}
4949

50-
CIVisibility.Initialize();
50+
TestOptimization.Instance.Initialize();
5151
}
5252

5353
/// <summary>

tracer/src/Datadog.Trace.Tools.Runner/CiUtils.cs

+37-32
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
33
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
44
// </copyright>
5+
56
#nullable enable
67

78
using System;
@@ -15,6 +16,7 @@
1516
using Datadog.Trace.Ci;
1617
using Datadog.Trace.Ci.CiEnvironment;
1718
using Datadog.Trace.Ci.Configuration;
19+
using Datadog.Trace.Ci.Net;
1820
using Datadog.Trace.Logging;
1921
using Datadog.Trace.Util;
2022
using Spectre.Console;
@@ -37,30 +39,33 @@ public static async Task<InitResults> InitializeCiCommandsAsync(
3739
// Define the arguments
3840
var lstArguments = new List<string>(args.Length > 1 ? args.Skip(1) : []);
3941

40-
// CI Visibility mode is enabled.
41-
var ciVisibilitySettings = CIVisibility.Settings;
42+
// Test optimization instance.
43+
var testOptimization = TestOptimization.Instance;
44+
45+
// Test optimization mode is enabled.
46+
var testOptimizationSettings = testOptimization.Settings;
4247

4348
// Get profiler environment variables
4449
if (!RunHelper.TryGetEnvironmentVariables(
4550
applicationContext,
4651
context,
4752
commonTracerSettings,
48-
new Utils.CIVisibilityOptions(ciVisibilitySettings.InstallDatadogTraceInGac, true, reducePathLength),
53+
new Utils.CIVisibilityOptions(testOptimizationSettings.InstallDatadogTraceInGac, true, reducePathLength),
4954
out var profilerEnvironmentVariables))
5055
{
5156
context.ExitCode = 1;
5257
return new InitResults(false, lstArguments, null, false, false, Task.CompletedTask);
5358
}
5459

55-
// Reload the CI Visibility settings (in case they were changed by the environment variables using the `--set-env` option)
56-
ciVisibilitySettings = CIVisibilitySettings.FromDefaultSources();
60+
// Reload the Test optimization settings (in case they were changed by the environment variables using the `--set-env` option)
61+
testOptimizationSettings = TestOptimizationSettings.FromDefaultSources();
5762

58-
// We force CIVisibility mode on child process
63+
// We force Test optimization mode on child process
5964
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.Enabled] = "1";
6065

6166
// We check the settings and merge with the command settings options
62-
var agentless = ciVisibilitySettings.Agentless;
63-
var apiKey = ciVisibilitySettings.ApiKey;
67+
var agentless = testOptimizationSettings.Agentless;
68+
var apiKey = testOptimizationSettings.ApiKey;
6469

6570
var customApiKey = apiKeyOption?.GetValue(context);
6671
if (!string.IsNullOrEmpty(customApiKey))
@@ -103,25 +108,25 @@ public static async Task<InitResults> InitializeCiCommandsAsync(
103108
var uploadRepositoryChangesTask = Task.CompletedTask;
104109

105110
// Set Agentless configuration from the command line options
106-
ciVisibilitySettings.SetAgentlessConfiguration(agentless, apiKey, ciVisibilitySettings.AgentlessUrl);
111+
testOptimizationSettings.SetAgentlessConfiguration(agentless, apiKey, testOptimizationSettings.AgentlessUrl);
107112

108113
if (!string.IsNullOrEmpty(agentUrl))
109114
{
110115
EnvironmentHelpers.SetEnvironmentVariable(Configuration.ConfigurationKeys.AgentUri, agentUrl);
111116
}
112117

113118
// Initialize flags to enable code coverage and test skipping
114-
var codeCoverageEnabled = ciVisibilitySettings.CodeCoverageEnabled == true || ciVisibilitySettings.TestsSkippingEnabled == true;
115-
var testSkippingEnabled = ciVisibilitySettings.TestsSkippingEnabled == true;
116-
var earlyFlakeDetectionEnabled = ciVisibilitySettings.EarlyFlakeDetectionEnabled == true;
117-
var flakyRetryEnabled = ciVisibilitySettings.FlakyRetryEnabled == true;
119+
var codeCoverageEnabled = testOptimizationSettings.CodeCoverageEnabled == true || testOptimizationSettings.TestsSkippingEnabled == true;
120+
var testSkippingEnabled = testOptimizationSettings.TestsSkippingEnabled == true;
121+
var earlyFlakeDetectionEnabled = testOptimizationSettings.EarlyFlakeDetectionEnabled == true;
122+
var flakyRetryEnabled = testOptimizationSettings.FlakyRetryEnabled == true;
118123

119124
var hasEvpProxy = !string.IsNullOrEmpty(agentConfiguration?.EventPlatformProxyEndpoint);
120125
if (agentless || hasEvpProxy)
121126
{
122127
// Initialize CI Visibility with the current settings
123128
Log.Debug("RunCiCommand: Initialize CI Visibility for the runner.");
124-
CIVisibility.InitializeFromRunner(ciVisibilitySettings, discoveryService, hasEvpProxy);
129+
testOptimization.InitializeFromRunner(testOptimizationSettings, discoveryService, hasEvpProxy);
125130

126131
// Upload git metadata by default (unless is disabled explicitly) or if ITR is enabled (required).
127132
Log.Debug("RunCiCommand: Uploading repository changes.");
@@ -135,15 +140,15 @@ public static async Task<InitResults> InitializeCiCommandsAsync(
135140
ciValues.GitSearchFolder = null;
136141
}
137142

138-
var lazyItrClient = new Lazy<IntelligentTestRunnerClient>(() => new(ciValues.WorkspacePath, ciVisibilitySettings));
139-
if (ciVisibilitySettings.GitUploadEnabled != false || ciVisibilitySettings.IntelligentTestRunnerEnabled)
143+
var client = TestOptimizationClient.Create(ciValues.WorkspacePath, testOptimizationSettings);
144+
if (testOptimizationSettings.GitUploadEnabled != false || testOptimizationSettings.IntelligentTestRunnerEnabled)
140145
{
141146
// If we are in git upload only then we can defer the await until the child command exits.
142147
async Task UploadRepositoryChangesAsync()
143148
{
144149
try
145150
{
146-
await lazyItrClient.Value.UploadRepositoryChangesAsync().ConfigureAwait(false);
151+
await client.UploadRepositoryChangesAsync().ConfigureAwait(false);
147152
}
148153
catch (Exception ex)
149154
{
@@ -164,32 +169,32 @@ async Task UploadRepositoryChangesAsync()
164169
// EVP proxy is enabled.
165170
// By setting the environment variables we avoid the usage of the DiscoveryService in each child process
166171
// to ask for EVP proxy support.
167-
var evpProxyMode = CIVisibility.EventPlatformProxySupportFromEndpointUrl(agentConfiguration?.EventPlatformProxyEndpoint).ToString();
172+
var evpProxyMode = testOptimization.TracerManagement?.EventPlatformProxySupportFromEndpointUrl(agentConfiguration?.EventPlatformProxyEndpoint).ToString();
168173
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.ForceAgentsEvpProxy] = evpProxyMode;
169174
EnvironmentHelpers.SetEnvironmentVariable(Configuration.ConfigurationKeys.CIVisibility.ForceAgentsEvpProxy, evpProxyMode);
170175
Log.Debug("RunCiCommand: EVP proxy was detected: {Mode}", evpProxyMode);
171176
}
172177

173178
// If we have an api key, and the code coverage or the tests skippable environment variables
174179
// are not set when the intelligent test runner is enabled, we query the settings api to check if it should enable coverage or not.
175-
if (!ciVisibilitySettings.IntelligentTestRunnerEnabled)
180+
if (!testOptimizationSettings.IntelligentTestRunnerEnabled)
176181
{
177182
Log.Debug("RunCiCommand: Intelligent test runner is disabled, call to configuration api skipped.");
178183
}
179184

180185
// If we still don't know if we have to enable code coverage or test skipping, then let's request the configuration API
181-
if (ciVisibilitySettings.IntelligentTestRunnerEnabled
182-
&& (ciVisibilitySettings.CodeCoverageEnabled == null ||
183-
ciVisibilitySettings.TestsSkippingEnabled == null ||
184-
ciVisibilitySettings.EarlyFlakeDetectionEnabled == null ||
185-
ciVisibilitySettings.FlakyRetryEnabled == null))
186+
if (testOptimizationSettings.IntelligentTestRunnerEnabled
187+
&& (testOptimizationSettings.CodeCoverageEnabled == null ||
188+
testOptimizationSettings.TestsSkippingEnabled == null ||
189+
testOptimizationSettings.EarlyFlakeDetectionEnabled == null ||
190+
testOptimizationSettings.FlakyRetryEnabled == null))
186191
{
187192
try
188193
{
189-
CIVisibility.Log.Debug("RunCiCommand: Calling configuration api...");
194+
testOptimization.Log.Debug("RunCiCommand: Calling configuration api...");
190195

191196
// we skip the framework info because we are interested in the target projects info not the runner one.
192-
var itrSettings = await lazyItrClient.Value.GetSettingsAsync(skipFrameworkInfo: true).ConfigureAwait(false);
197+
var itrSettings = await client.GetSettingsAsync(skipFrameworkInfo: true).ConfigureAwait(false);
193198

194199
// we check if the backend require the git metadata first
195200
if (itrSettings.RequireGit == true)
@@ -198,7 +203,7 @@ async Task UploadRepositoryChangesAsync()
198203
await uploadRepositoryChangesTask.ConfigureAwait(false);
199204

200205
Log.Debug("RunCiCommand: calling the configuration api again.");
201-
itrSettings = await lazyItrClient.Value.GetSettingsAsync(skipFrameworkInfo: true).ConfigureAwait(false);
206+
itrSettings = await client.GetSettingsAsync(skipFrameworkInfo: true).ConfigureAwait(false);
202207
}
203208

204209
codeCoverageEnabled = codeCoverageEnabled || itrSettings.CodeCoverage == true || itrSettings.TestsSkipping == true;
@@ -208,7 +213,7 @@ async Task UploadRepositoryChangesAsync()
208213
}
209214
catch (Exception ex)
210215
{
211-
CIVisibility.Log.Warning(ex, "Error getting ITR settings from configuration api");
216+
testOptimization.Log.Warning(ex, "Error getting ITR settings from configuration api");
212217
}
213218
}
214219
}
@@ -217,9 +222,9 @@ async Task UploadRepositoryChangesAsync()
217222
Log.Debug("RunCiCommand: TestSkippingEnabled = {Value}", testSkippingEnabled);
218223
Log.Debug("RunCiCommand: EarlyFlakeDetectionEnabled = {Value}", earlyFlakeDetectionEnabled);
219224
Log.Debug("RunCiCommand: FlakyRetryEnabled = {Value}", flakyRetryEnabled);
220-
ciVisibilitySettings.SetCodeCoverageEnabled(codeCoverageEnabled);
221-
ciVisibilitySettings.SetEarlyFlakeDetectionEnabled(earlyFlakeDetectionEnabled);
222-
ciVisibilitySettings.SetFlakyRetryEnabled(flakyRetryEnabled);
225+
testOptimizationSettings.SetCodeCoverageEnabled(codeCoverageEnabled);
226+
testOptimizationSettings.SetEarlyFlakeDetectionEnabled(earlyFlakeDetectionEnabled);
227+
testOptimizationSettings.SetFlakyRetryEnabled(flakyRetryEnabled);
223228
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.CodeCoverage] = codeCoverageEnabled ? "1" : "0";
224229
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.EarlyFlakeDetectionEnabled] = earlyFlakeDetectionEnabled ? "1" : "0";
225230
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.FlakyRetryEnabled] = flakyRetryEnabled ? "1" : "0";
@@ -228,7 +233,7 @@ async Task UploadRepositoryChangesAsync()
228233
{
229234
// If test skipping is disabled we set this to the child process so we avoid to query the settings api again.
230235
// If is not disabled we need to query the backend again in the child process with more runtime info.
231-
ciVisibilitySettings.SetTestsSkippingEnabled(testSkippingEnabled);
236+
testOptimizationSettings.SetTestsSkippingEnabled(testSkippingEnabled);
232237
profilerEnvironmentVariables[Configuration.ConfigurationKeys.CIVisibility.TestsSkippingEnabled] = "0";
233238
}
234239

0 commit comments

Comments
 (0)