🌱 Collect support-bundle diagnostics on e2e failure#2750
Conversation
Install troubleshoot.sh support-bundle CLI in the e2e workflow and collect cluster diagnostics when tests fail. The bundle is uploaded alongside existing artifacts for post-failure debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds automatic cluster diagnostics collection to the e2e GitHub Actions workflow by installing the support-bundle CLI for artifact-enabled test variants and running it on test failure to upload the resulting bundle alongside existing artifacts. This helps make CI failures more actionable by capturing cluster state and logs when a Kind cluster is still reachable.
Changes:
- Introduces a
SUPPORT_BUNDLE_VERSIONworkflow env var for pinning thesupport-bundleCLI version. - Installs
support-bundleprior to running e2e tests foruse-artifacts: truematrix entries. - On test failure, attempts to collect a support bundle (when the cluster is reachable) and uploads it via the existing artifact upload step.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| curl -sL https://github.com/replicatedhq/troubleshoot/releases/download/${{ env.SUPPORT_BUNDLE_VERSION }}/support-bundle_linux_amd64.tar.gz | tar xz -C /usr/local/bin support-bundle | ||
| support-bundle version |
There was a problem hiding this comment.
/usr/local/bin is writable without sudo on GitHub-hosted runners. This repo's own tilt.yaml workflow uses the same pattern (line 31). Not a real issue.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2750 +/- ##
=======================================
Coverage 66.95% 66.95%
=======================================
Files 149 149
Lines 11341 11341
=======================================
Hits 7593 7593
Misses 3191 3191
Partials 557 557
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Create /tmp/artifacts if it doesn't exist yet, so support-bundle collection works even when tests fail before writing any artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Description
Collect cluster diagnostics using troubleshoot.sh
support-bundleCLI when e2e tests fail, so we have actionable data for debugging CI failures.Changes:
SUPPORT_BUNDLE_VERSIONenv var to the e2e workflowsupport-bundlebinary before tests run (foruse-artifacts: truevariants only)/tmp/artifacts/support-bundle.tar.gzand uploaded via the existingupload-artifactstepThe support bundle runs with default collectors (
clusterInfo+clusterResources), which captures pods, deployments, events, nodes, CRDs, custom resources, and pod logs across all namespaces.Reviewer Checklist