Skip to content

🌱 Collect support-bundle diagnostics on e2e failure#2750

Open
pedjak wants to merge 2 commits into
operator-framework:mainfrom
pedjak:add-support-bundle
Open

🌱 Collect support-bundle diagnostics on e2e failure#2750
pedjak wants to merge 2 commits into
operator-framework:mainfrom
pedjak:add-support-bundle

Conversation

@pedjak
Copy link
Copy Markdown
Contributor

@pedjak pedjak commented Jun 5, 2026

Description

Collect cluster diagnostics using troubleshoot.sh support-bundle CLI when e2e tests fail, so we have actionable data for debugging CI failures.

Changes:

  • Add SUPPORT_BUNDLE_VERSION env var to the e2e workflow
  • Install the support-bundle binary before tests run (for use-artifacts: true variants only)
  • On failure, collect a support bundle if the kind cluster is still reachable
  • The bundle is saved to /tmp/artifacts/support-bundle.tar.gz and uploaded via the existing upload-artifact step

The 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

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

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]>
Copilot AI review requested due to automatic review settings June 5, 2026 16:15
@openshift-ci openshift-ci Bot requested review from dtfranz and tmshort June 5, 2026 16:15
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 5, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign perdasilva for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 5, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 9cee2ad
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6a23de8015d34f0008fc64f2
😎 Deploy Preview https://deploy-preview-2750--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_VERSION workflow env var for pinning the support-bundle CLI version.
  • Installs support-bundle prior to running e2e tests for use-artifacts: true matrix 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.

Comment on lines +55 to +57
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
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/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.

Comment thread .github/workflows/e2e.yaml
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.95%. Comparing base (08068a0) to head (9cee2ad).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
e2e 35.17% <ø> (ø)
experimental-e2e 52.55% <ø> (+0.04%) ⬆️
unit 52.24% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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]>
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.

2 participants