test: stabilize KubernetesClusterDockerTest with readiness probe and rich pod diagnostics #20814
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.71) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.71 · 496 lines diff across 6 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.371
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.071
Real PR Conversation Timeline
1 comments
"Review active on #20814"
general
weight: 0.35
FrankChen021
Fixes #20432.
Description
KubernetesClusterDockerTesthas intermittently failed in CI (docker-tests) during class setup because K3s pods occasionally failed to becomeReady=Truewithin 300 s. When the timeout occurred,K3sClusterResource.waitUntilPodIsReadythrew anISEreporting only the pod name without any diagnostic details (no pod phase, conditions, container states, restart counts, or logs), making it difficult to determine why the pod stalled.Added readiness probe and tuned heap in
manifests/druid-service.yaml/status/healthreadinessProbewithinitialDelaySeconds: 5,periodSeconds: 5, andfailureThreshold: 30tomanifests/druid-service.yaml, matching the existing pattern indruid-service-with-operator.yaml. With this probe, Kubernetes sets the pod conditionReady=Trueonly after the Druid service starts and reports healthy, and recordsUnhealthywarning events if the probe fails.DRUID_XMXfrom128mto256minmanifests/druid-service.yamlto provide sufficient heap headroom during service initialization on resource-constrained CI runners and prevent OOM/crash restarts.Added synchronization for service pod creation in
K3sClusterResourceK3sClusterResource.waitUntilPodsAreReadyto wait until all expected service pods are created by the Deployment controllers before evaluating readiness conditions, avoiding race conditions where a subset of pods was evaluated before all service pods appeared in the namespace.Added rich diagnostics on pod readiness timeout
K3sClusterResource.waitUntilPodIsReadyon timeout to query Fabric8 and assemble a detailed diagnostic report in the exception message:- Pod phase and conditions (
Ready,ContainersReady,Initialized,PodScheduled) with reasons and messages.- Container statuses including ready state, restart count, current state (waiting reason, terminated exit code/reason), and last terminated state (e.g.,
OOMKilled, exit code 137).- Relevant Kubernetes cluster events from
client.v1().events()for the pod (e.g.BackOff,Unhealthy,FailedScheduling).- Tail of the container log.
Added pod log dumping for CI artifact collection
dumpPodLogsinK3sClusterResourceto write full pod logs todruid-container-logs/<testClassName>/k3s-pods/<podName>.logupon timeout or health check failure, enabling GitHub Actions CI to archive and upload them as part of thefailure-druid-container-logsartifact.Added
K3sClusterResourceTestunit testsK3sClusterResourceTestverifying diagnostic formatting acrossRunning,CrashLoopBackOff(withOOMKilledlast state), and readiness probe failure scenarios, as well as verifying thatmanifests/druid-service.yamlgenerates the expectedreadinessProbeand heap configuration when processed byK3sDruidService.Release note
None (internal test and CI stabilization improvement).
<hr>
##### Key changed/added classes in this PR
K3sClusterResourceK3sClusterResourceTest*
manifests/druid-service.yaml<hr>
This PR has: