You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 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. -->
0 commit comments