-
Notifications
You must be signed in to change notification settings - Fork 140
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
[CI Visibility] UDS and NamedPipes support #5634
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c000840
[CI Visibility] UDS and NamedPipes support
tonyredondo 6ff4327
Fix and add support for the EVP proxy part
tonyredondo 8a129d8
Reuse AgentTransportStrategy
tonyredondo 5f70ddf
reuse code and snapshots
tonyredondo ebdc23e
NamedPipes tests only on Windows.
tonyredondo acd2313
Ignore pipes tests on non windows
tonyredondo cd4eb0e
moar logs
tonyredondo d7af2aa
Disable parallelism
tonyredondo d4c1972
Add missing gac installer/uninstaller for windows tests
tonyredondo 35478fc
Fix missing GAC bits for .NET Framework
tonyredondo 469523d
Failure improvements???
tonyredondo 3cb30b3
Merge branch 'master' into tony/civisibility-uds-pipes-support
tonyredondo 8f1600c
moar debug?
tonyredondo cd856d5
Merge branch 'master' into tony/civisibility-uds-pipes-support
tonyredondo 1c27808
Fix
tonyredondo 16618cf
Fix instrumentation
tonyredondo 34fd92c
stop polluting CI logs with the environment variables
tonyredondo 59b1f4c
fixes
tonyredondo f0d2eca
Merge branch 'master' into tony/civisibility-uds-pipes-support
tonyredondo a0f9816
fixes
tonyredondo 9c78586
fixes test helper for dotnet vstest in windows x86
tonyredondo 15956bc
Merge branch 'master' into tony/civisibility-uds-pipes-support
tonyredondo 0feca6b
Removing the DD_TRACE_DEBUG environment variable and increasing the r…
tonyredondo 5dc9c9d
Remove Debug enabled flag
tonyredondo 03fcca7
Merge branch 'master' into tony/civisibility-uds-pipes-support
tonyredondo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitEvpTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// <copyright file="PipesXUnitEvpTests.cs" company="Datadog"> | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. | ||
// </copyright> | ||
#if NETCOREAPP3_1_OR_GREATER | ||
using System; | ||
using System.Threading.Tasks; | ||
using Datadog.Trace.Configuration; | ||
using Datadog.Trace.TestHelpers; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI; | ||
|
||
[Collection(nameof(TransportTestsCollection))] | ||
public class PipesXUnitEvpTests(ITestOutputHelper output) : XUnitEvpTests(output) | ||
{ | ||
[SkippableTheory] | ||
[MemberData(nameof(GetData))] | ||
[Trait("RunOnWindows", "True")] | ||
[Trait("Category", "EndToEnd")] | ||
[Trait("Category", "TestIntegrations")] | ||
public override async Task SubmitTraces(string packageVersion, string evpVersionToRemove, bool expectedGzip) | ||
{ | ||
SkipOn.Platform(SkipOn.PlatformValue.MacOs); | ||
SkipOn.Platform(SkipOn.PlatformValue.Linux); | ||
EnvironmentHelper.EnableWindowsNamedPipes(); | ||
|
||
// The server implementation of named pipes is flaky so have 5 attempts | ||
var attemptsRemaining = 5; | ||
while (true) | ||
{ | ||
try | ||
{ | ||
attemptsRemaining--; | ||
await base.SubmitTraces(packageVersion, evpVersionToRemove, expectedGzip); | ||
return; | ||
} | ||
catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException) | ||
{ | ||
await ReportRetry(Output, attemptsRemaining, ex); | ||
} | ||
} | ||
} | ||
|
||
[SkippableTheory] | ||
[MemberData(nameof(GetDataForEarlyFlakeDetection))] | ||
[Trait("RunOnWindows", "True")] | ||
[Trait("Category", "EndToEnd")] | ||
[Trait("Category", "TestIntegrations")] | ||
[Trait("Category", "EarlyFlakeDetection")] | ||
public override async Task EarlyFlakeDetection(string packageVersion, string evpVersionToRemove, bool expectedGzip, string settingsJson, string testsJson, int expectedSpans, string friendlyName) | ||
{ | ||
SkipOn.Platform(SkipOn.PlatformValue.MacOs); | ||
SkipOn.Platform(SkipOn.PlatformValue.Linux); | ||
EnvironmentHelper.EnableWindowsNamedPipes(); | ||
|
||
// The server implementation of named pipes is flaky so have 5 attempts | ||
var attemptsRemaining = 5; | ||
while (true) | ||
{ | ||
try | ||
{ | ||
attemptsRemaining--; | ||
await base.EarlyFlakeDetection(packageVersion, evpVersionToRemove, expectedGzip, settingsJson, testsJson, expectedSpans, friendlyName); | ||
return; | ||
} | ||
catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException) | ||
{ | ||
await ReportRetry(Output, attemptsRemaining, ex); | ||
} | ||
} | ||
} | ||
} | ||
#endif |
48 changes: 48 additions & 0 deletions
48
tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/PipesXUnitTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// <copyright file="PipesXUnitTests.cs" company="Datadog"> | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. | ||
// </copyright> | ||
|
||
#if NETCOREAPP3_1_OR_GREATER | ||
using System; | ||
using System.Threading.Tasks; | ||
using Datadog.Trace.Configuration; | ||
using Datadog.Trace.TestHelpers; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI; | ||
|
||
[Collection(nameof(TransportTestsCollection))] | ||
public class PipesXUnitTests(ITestOutputHelper output) : XUnitTests(output) | ||
{ | ||
[SkippableTheory] | ||
[MemberData(nameof(PackageVersions.XUnit), MemberType = typeof(PackageVersions))] | ||
[Trait("RunOnWindows", "True")] | ||
[Trait("Category", "EndToEnd")] | ||
[Trait("Category", "TestIntegrations")] | ||
public override async Task SubmitTraces(string packageVersion) | ||
{ | ||
SkipOn.Platform(SkipOn.PlatformValue.MacOs); | ||
SkipOn.Platform(SkipOn.PlatformValue.Linux); | ||
EnvironmentHelper.EnableWindowsNamedPipes(); | ||
|
||
// The server implementation of named pipes is flaky so have 5 attempts | ||
var attemptsRemaining = 5; | ||
while (true) | ||
{ | ||
try | ||
{ | ||
attemptsRemaining--; | ||
await base.SubmitTraces(packageVersion); | ||
return; | ||
} | ||
catch (Exception ex) when (attemptsRemaining > 0 && ex is not SkipException) | ||
{ | ||
await ReportRetry(Output, attemptsRemaining, ex); | ||
} | ||
} | ||
} | ||
} | ||
|
||
#endif |
36 changes: 36 additions & 0 deletions
36
tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/CI/TcpXUnitEvpTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// <copyright file="TcpXUnitEvpTests.cs" company="Datadog"> | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc. | ||
// </copyright> | ||
#if NETCOREAPP3_1_OR_GREATER | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Datadog.Trace.ClrProfiler.IntegrationTests.CI; | ||
|
||
[Collection(nameof(TransportTestsCollection))] | ||
public class TcpXUnitEvpTests(ITestOutputHelper output) : XUnitEvpTests(output) | ||
{ | ||
[SkippableTheory] | ||
[MemberData(nameof(GetData))] | ||
[Trait("Category", "EndToEnd")] | ||
[Trait("Category", "TestIntegrations")] | ||
public override Task SubmitTraces(string packageVersion, string evpVersionToRemove, bool expectedGzip) | ||
{ | ||
EnvironmentHelper.EnableDefaultTransport(); | ||
return base.SubmitTraces(packageVersion, evpVersionToRemove, expectedGzip); | ||
} | ||
|
||
[SkippableTheory] | ||
[MemberData(nameof(GetDataForEarlyFlakeDetection))] | ||
[Trait("Category", "EndToEnd")] | ||
[Trait("Category", "TestIntegrations")] | ||
[Trait("Category", "EarlyFlakeDetection")] | ||
public override Task EarlyFlakeDetection(string packageVersion, string evpVersionToRemove, bool expectedGzip, string settingsJson, string testsJson, int expectedSpans, string friendlyName) | ||
{ | ||
EnvironmentHelper.EnableDefaultTransport(); | ||
return base.EarlyFlakeDetection(packageVersion, evpVersionToRemove, expectedGzip, settingsJson, testsJson, expectedSpans, friendlyName); | ||
} | ||
} | ||
#endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 attempts? Is it really that flaky?! IIRC, looking at the metrics, we normally need 1 retry, tops 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw a fail with 3 attempts, so I'm trying to play safe...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still find 3 consecutive failures concerning 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next week I'll look deeper on why the flakiness happens, but seems like something related to our mock server, the test being flaky do parallel connections and send approx 120 spans using those. Is very stable for small payloads.