Skip to content

[Backport v1.26] test(e2e): always tear down DDA before next subtest to avoid races#2955

Merged
tbavelier merged 1 commit into
v1.26from
backport-2954-to-v1.26
Apr 28, 2026
Merged

[Backport v1.26] test(e2e): always tear down DDA before next subtest to avoid races#2955
tbavelier merged 1 commit into
v1.26from
backport-2954-to-v1.26

Conversation

@dd-octo-sts

@dd-octo-sts dd-octo-sts Bot commented Apr 28, 2026

Copy link
Copy Markdown

Backport 41dddf7 from #2954.


Summary

  • Adds an applyDDA helper to TestGenericK8s that does a WithoutDDA pre-step before applying each new DatadogAgent, and routes every DDA-applying subtest through it.
  • Fixes the K8s 1.19-only flake on KSM_check_works_cluster_check_runner where the new node-agent DaemonSet pod would sit in FailedMount on 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.
  • Collapses the inline two-step WithoutDDA boilerplate 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-tests passes without retries
  • CI matrix passes on the other supported K8s versions

@dd-octo-sts
dd-octo-sts Bot requested a review from a team as a code owner April 28, 2026 13:29
@dd-octo-sts dd-octo-sts Bot added tooling qa/skip-qa backport label added by backport action bot label added by backport bot team/container-platform labels Apr 28, 2026
@codecov-commenter

codecov-commenter commented Apr 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.68%. Comparing base (d7d73cf) to head (2f3ee5f).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            v1.26    #2955   +/-   ##
=======================================
  Coverage   40.68%   40.68%           
=======================================
  Files         321      321           
  Lines       28492    28492           
=======================================
  Hits        11593    11593           
  Misses      16044    16044           
  Partials      855      855           
Flag Coverage Δ
unittests 40.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d7d73cf...2f3ee5f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tbavelier
tbavelier merged commit 354f6ec into v1.26 Apr 28, 2026
61 checks passed
@tbavelier
tbavelier deleted the backport-2954-to-v1.26 branch April 28, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport label added by backport action bot label added by backport bot qa/skip-qa team/container-platform tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants