test(e2e): always tear down DDA before next subtest to avoid races#2954
Open
test(e2e): always tear down DDA before next subtest to avoid races#2954
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2954 +/- ##
=======================================
Coverage 40.92% 40.92%
=======================================
Files 324 324
Lines 28750 28750
=======================================
Hits 11767 11767
Misses 16129 16129
Partials 854 854
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
🎯 Code Coverage (details) 🔗 Commit SHA: fe6a71a | Docs | Datadog PR Page | 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.
Summary
applyDDAhelper toTestGenericK8sthat does aWithoutDDApre-step before applying each new DatadogAgent, and routes every DDA-applying subtest through it.KSM_check_works_cluster_check_runnerwhere the new node-agent DaemonSet pod would sit inFailedMounton its auto-generated<sa>-token-<rand>Secret because the legacy SA-token controller (pre-TokenRequest, pre-1.20) couldn't keep up with the SA delete+create churn from a direct DDA swap.WithoutDDAboilerplate that APM and DSD UDP subtests already had (net −5 lines).The same race is latent on every other subtest that swaps DDAs; doing the cleanup uniformly removes that exposure (DSD UDS, Autodiscovery, Logs were unprotected before). On K8s ≥1.20 the cleanup step is essentially a no-op for the SA-token path, but still useful for hostPort rebinding.
Test plan
make K8S_VERSION=1.19 e2e-testspasses without retries