[system_tests] Fix flaky test_asm_standalone.py tests#6377
Open
vlad-scherbich wants to merge 4 commits intomainfrom
Open
[system_tests] Fix flaky test_asm_standalone.py tests#6377vlad-scherbich wants to merge 4 commits intomainfrom
vlad-scherbich wants to merge 4 commits intomainfrom
Conversation
Contributor
|
|
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🔗 Commit SHA: 8f85efa | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
https://datadoghq.atlassian.net/browse/PROF-13796
Motivation
Out of the latest 100 flaked system-test CI runs on
dd-trace-pymain, 75 are dynamic configuration tests (58% of total). See JIRA for details.Similar motivation as #6371. Test suite in question:
test_asm_standalone.py::Test_IastStandalone_UpstreamPropagation_V2::test_no_appsec_upstream__no_asm_event__is_kept_with_priority_1__from_0These tests are flaky because the trace sometimes wasn't flushed to the agent before the scenario stopped. The tracer sends traces asynchronously; without a short delay, the trace could still be buffered when containers shut down.
Changes
interfaces.library.get_spans(request)every 0.5s until the trace appears (5s timeout). Exits as soon as the trace is captured, or fails with a clear error on timeout._iast_standalone_wait_for_trace(request)helper and apply it in setup for all 9 flaky IAST tests inTest_IastStandalone_UpstreamPropagation_V2. Scoped toiast_standaloneonly soappsec_standalone(e.g. PHP) is unchanged.Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present