Skip to content

Commit 02f5187

Browse files
Automatic retry ASM integration tests under failure (#8011)
## Summary of changes The following jobs have been found flaky, mostly due to a already reported crash condition: ``` integration_tests_windows.Win x86_net9.0_ASM 7 failures / last month integration_tests_linux.Test alpine_net7.0_ASM 5 failures / last month integration_tests_linux.Test alpine_net9.0_ASM 5 failures / last month integration_tests_linux.Test debian_net9.0_ASM 3 failures / last month ``` The complete flakiness report can be found here: https://docs.google.com/spreadsheets/d/1Gftmhb-66Dag4qFEXw9tyXp7U0fOQsdCE2gI-1voWyA/edit?gid=1708590243#gid=1708590243 The affected jobs will automatically be retried once to avoid CI flakiness. For other teams, the flaky tests have been marked as flaky, which causes automatic retry. In the case of ASM, the failure does not occur on especific tests, so marking some of them would not solve the issue. This change can be reverted once the jobs are more stable. This PR is part of an initiative of marking the most flaky tests or jobs of all the teams. ## Reason for change ## Implementation details ## Test coverage ## 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. MergeQueue is NOT enabled in this repository. If you have write access to the repo, the PR has 1-2 approvals (see above), and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #apm-dotnet channel in Slack. -->
1 parent cc6f569 commit 02f5187

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

.azure-pipelines/ultimate-pipeline.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,12 +1710,25 @@ stages:
17101710
SampleName: $(IntegrationTestSampleName)
17111711

17121712
- script: tracer\build.cmd RunIntegrationTests RunWindowsRegressionTests -Framework $(framework) --code-coverage-enabled $(CodeCoverageEnabled)
1713-
displayName: Run integration tests
1713+
displayName: Run integration tests (Tracer)
1714+
condition: ne(variables['area'], 'ASM')
1715+
env:
1716+
DD_LOGGER_DD_API_KEY: $(ddApiKey)
1717+
enable_crash_dumps: true
1718+
Filter: $(IntegrationTestFilter)
1719+
SampleName: $(IntegrationTestSampleName)
1720+
Area: $(area)
1721+
1722+
- script: tracer\build.cmd RunIntegrationTests RunWindowsRegressionTests -Framework $(framework) --code-coverage-enabled $(CodeCoverageEnabled)
1723+
displayName: Run integration tests (ASM)
1724+
condition: eq(variables['area'], 'ASM')
1725+
retryCountOnTaskFailure: 2
17141726
env:
17151727
DD_LOGGER_DD_API_KEY: $(ddApiKey)
17161728
enable_crash_dumps: true
17171729
Filter: $(IntegrationTestFilter)
17181730
SampleName: $(IntegrationTestSampleName)
1731+
Area: $(area)
17191732

17201733
# TODO: Re-enable test-agent.windows once VM images are updated (hitting rate limits for docker)
17211734
# - script: docker compose -f docker-compose.windows.yml down
@@ -2272,7 +2285,26 @@ stages:
22722285
-e SampleName=$(IntegrationTestSampleName) \
22732286
-e Area=$(area) \
22742287
IntegrationTests
2275-
displayName: docker-compose run IntegrationTests
2288+
displayName: docker-compose run IntegrationTests (Tracer)
2289+
condition: ne(variables['area'], 'ASM')
2290+
env:
2291+
DD_LOGGER_DD_API_KEY: $(ddApiKey)
2292+
baseImage: $(baseImage) # for interpolation in the docker-compose file
2293+
2294+
- script: |
2295+
docker-compose -f docker-compose.yml -p $(DockerComposeProjectName) \
2296+
run --no-deps --rm \
2297+
-e baseImage=$(baseImage) \
2298+
-e framework=$(publishTargetFramework) \
2299+
-e CodeCoverageEnabled=$(CodeCoverageEnabled) \
2300+
-e IncludeTestsRequiringDocker=false \
2301+
-e Filter=$(IntegrationTestFilter) \
2302+
-e SampleName=$(IntegrationTestSampleName) \
2303+
-e Area=$(area) \
2304+
IntegrationTests
2305+
displayName: docker-compose run IntegrationTests (ASM)
2306+
condition: eq(variables['area'], 'ASM')
2307+
retryCountOnTaskFailure: 2
22762308
env:
22772309
DD_LOGGER_DD_API_KEY: $(ddApiKey)
22782310
baseImage: $(baseImage) # for interpolation in the docker-compose file

tracer/test/Datadog.Trace.Security.IntegrationTests/AspNetWebApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public AspNetWebApi(IisFixture iisFixture, ITestOutputHelper output, bool classi
8787
public Task TestSecurity(string test, string url, string body)
8888
{
8989
// if blocking is enabled, request stops before reaching asp net mvc integrations intercepting before action methods, so no more spans are generated
90-
// NOTE: by integrating the latest version of the WAF, blocking was disabled, as it does not support blocking yet
90+
// NOTE: by integrating the latest version of the WAF, blocking was disabled, as it does not support blocking yet.
9191
var sanitisedUrl = VerifyHelper.SanitisePathsForVerify(url);
9292
var settings = VerifyHelper.GetSpanVerifierSettings(test, sanitisedUrl, body);
9393
FilterConnectionHeader(settings);

0 commit comments

Comments
 (0)