Skip to content

feat: log only failing pods on helm validation job debug - #138

Draft
Tim-herbie with Copilot wants to merge 2 commits into
mainfrom
copilot/improve-debugging-helm-validation-failures
Draft

feat: log only failing pods on helm validation job debug#138
Tim-herbie with Copilot wants to merge 2 commits into
mainfrom
copilot/improve-debugging-helm-validation-failures

Conversation

Copilot AI commented Jul 23, 2026

Copy link
Copy Markdown

Debug output on validation failure currently calls kubectl describe pods -A, flooding logs with info from healthy pods and burying the actual failure signal.

Changes

  • Filter failing pods: Replace blanket describe pods -A with a grep filter excluding Running, Completed, and Succeeded pods — only surfaces pods actually in a bad state
  • Add per-pod logs: For each failing pod, fetch logs from all containers (--all-containers=true --tail=100) alongside the describe output
  • Sort events by time: kubectl get events -A --sort-by='.lastTimestamp' for chronological ordering

Applied to both the helm-validation and e2e job debug steps.

kubectl get pods -A --no-headers | grep -vE '\s+(Running|Completed|Succeeded)\s+' | awk '{print $1" "$2}' | while read -r ns pod; do
  kubectl describe pod "$pod" -n "$ns"
  kubectl logs "$pod" -n "$ns" --all-containers=true --tail=100 2>/dev/null || true
done

Copilot AI changed the title [WIP] Enhance debugging for failed helm validation jobs feat: log only failing pods on helm validation job debug Jul 23, 2026
Copilot AI requested a review from Tim-herbie July 23, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Debugging when helm validation job fails

2 participants