fix(e2e): Fix the OpenShift cluster dump and flare the Cluster Checks Runners #61288
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 359 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.352
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #61288"
general
weight: 0.35
L3n41c
What does this PR do?
Fixes the OpenShift cluster dump of the e2e framework, which always failed, and adds the Cluster Checks Runner pods to the flares of
Kubernetes.Diagnose. The dump also shares the kubeconfig rewrite of the OpenShift component (OpenShiftKubeconfigForVM) instead of its own copy.<details>
<summary>Functional changes</summary>
| Before | After |
| --- | --- |
| OpenShift VM on GCP: the provisioner cluster dump, run at teardown, failed with
failed to read kubeconfig under '.kube/config'and printed nothing | It reads CRC's~/.crc/machines/crc/kubeconfig, so it printskubectl get nodes,all --all-namespaces -o wideand the last 100 lines of the previous logs of every restarted or unready container, like on kind and EKS || Local OpenShift run (GCP
agent-sandbox): the dump looked for the VM in the hard-codeddatadog-agent-qaproject and never found it | It looks in the project and zone of the GCP environment of the run || A failed test flared the Linux and Windows node agent and cluster agent pods | It also flares the Cluster Checks Runner pods (skipped on GKE Autopilot pods, which reject exec, like the others) |
Unchanged: the dumps of the other providers, the pod lookups of
Diagnose(datadognamespace,app=selector) and its early return when there is no Linux node agent pod.Security changes
| Before | After |
| --- | --- |
| The OpenShift cluster dump printed the whole kubeconfig in the job log (it never got that far, see above) | It only prints the API server of each cluster: the kubeconfig holds the cluster credentials |
</details>
Motivation
new-e2e-containers-openshiftfails ~15% of the runs onmainsince 2026-11-12 because the node agent container restarts (TestZZUpAndRunning:container agent in pod dda-linux-datadog-xxx restarted 1 time(s)), but the job gives nothing to understand why: on OpenShift, the cluster dump that prints the logs of the previous instance of restarted containers always failed on a wrong kubeconfig path. With it fixed, the next failure shows the end of the logs of the crashed Agent. If a container restarts several times, only the last restart is shown, which is enough since no restart is expected.Describe how you validated your changes
dda inv linter.goon both packages and the existing unit tests. Not run against a real OpenShift cluster: the next failingnew-e2e-containers-openshiftrun will show the dump. The new Diagnose section has no unit test, like the existing ones: the fake clientset can't exec into pods.Additional Notes
The first commit also reported the last termination (reason, exit code) in the
WaitForAgentReadyerror and saved the full previous logs inDiagnose; the second commit reverts that in favor of the existing teardown dump.🤖 Generated with Claude Code