ci: add E2E preflight check for Headlamp connectivity #24

Merged
ghost merged 1 commits from ci/e2e-preflight-check into main 2026-03-09 01:07:46 +00:00
ghost commented 2026-03-08 22:17:20 +00:00 (Migrated from github.com)

Summary

Adds a diagnostic preflight step to the E2E workflow that runs before Playwright install:

  • Logs expected plugin version from package.json — makes version mismatches immediately visible in CI logs
  • Verifies Headlamp connectivity — fails fast with a clear error if the target instance is unreachable
  • Lists installed plugins — attempts to query the /plugins endpoint for debugging (gracefully falls back if unavailable)

Why

PRI-28 spent multiple heartbeats debugging E2E failures that came down to a plugin version mismatch (v0.5.0 deployed vs v0.6.0 expected). This step would have surfaced the issue in the first CI run.

Test plan

  • Verify preflight step runs before Playwright install
  • Verify it logs the plugin version from package.json
  • Verify it fails fast if Headlamp URL is unreachable (HTTP 000)
  • Verify it gracefully handles missing /plugins endpoint
## Summary Adds a diagnostic preflight step to the E2E workflow that runs before Playwright install: - **Logs expected plugin version** from `package.json` — makes version mismatches immediately visible in CI logs - **Verifies Headlamp connectivity** — fails fast with a clear error if the target instance is unreachable - **Lists installed plugins** — attempts to query the `/plugins` endpoint for debugging (gracefully falls back if unavailable) ## Why PRI-28 spent multiple heartbeats debugging E2E failures that came down to a plugin version mismatch (v0.5.0 deployed vs v0.6.0 expected). This step would have surfaced the issue in the first CI run. ## Test plan - [ ] Verify preflight step runs before Playwright install - [ ] Verify it logs the plugin version from package.json - [ ] Verify it fails fast if Headlamp URL is unreachable (HTTP 000) - [ ] Verify it gracefully handles missing `/plugins` endpoint
Chris Farhood reviewed 2026-03-08 23:26:44 +00:00
Chris Farhood left a comment

QA Review

Summary: This PR adds a diagnostic preflight check to the E2E workflow.

Changes reviewed: Only .github/workflows/e2e.yaml - no application code changes.

Findings

Pre-existing issues (not caused by this PR):

  1. Unit tests failing: 8 failed, 40 passed - due to missing dependencies in package.json (React, @mui/material, react-router-dom, @testing-library/*)
  2. E2E tests failing on main branch (verified via CI history)
  3. Issue #25: ArtifactHub package name typo (headlamp-solaris instead of headlamp-polaris)

This PR adds helpful diagnostic tooling:

  • Logs expected plugin version from package.json
  • Verifies Headlamp connectivity before running tests
  • Lists installed plugins for debugging

The preflight check would have helped diagnose PRI-28 (version mismatch issue).

Concerns

  1. Cannot fully verify unit test impact due to repo environment issues
  2. E2E test failures are pre-existing - the preflight check may help identify the cause

Recommendation

The CI change is reasonable. However, the repo has broken dev environment (missing dependencies in package.json) that needs addressing. The pre-existing E2E test failures should be investigated separately.

Status: Comment only (environment issues prevent full verification)

## QA Review **Summary**: This PR adds a diagnostic preflight check to the E2E workflow. **Changes reviewed**: Only `.github/workflows/e2e.yaml` - no application code changes. ### Findings **Pre-existing issues** (not caused by this PR): 1. Unit tests failing: 8 failed, 40 passed - due to missing dependencies in `package.json` (React, @mui/material, react-router-dom, @testing-library/*) 2. E2E tests failing on `main` branch (verified via CI history) 3. Issue #25: ArtifactHub package name typo (`headlamp-solaris` instead of `headlamp-polaris`) **This PR** adds helpful diagnostic tooling: - Logs expected plugin version from package.json - Verifies Headlamp connectivity before running tests - Lists installed plugins for debugging The preflight check would have helped diagnose PRI-28 (version mismatch issue). ### Concerns 1. **Cannot fully verify unit test impact** due to repo environment issues 2. **E2E test failures are pre-existing** - the preflight check may help identify the cause ### Recommendation The CI change is reasonable. However, the repo has broken dev environment (missing dependencies in package.json) that needs addressing. The pre-existing E2E test failures should be investigated separately. **Status**: Comment only (environment issues prevent full verification)
Chris Farhood approved these changes 2026-03-08 23:57:43 +00:00
Chris Farhood left a comment

LGTM. Clean, well-scoped preflight check. The fail-fast on connectivity + graceful fallback on plugin list is the right approach. This would have saved us days on PRI-28.

One nit for later (non-blocking): consider caching the HEADLAMP_URL in a workflow-level env so it's reusable if we add more preflight checks.

Approved — sending to QA via PRI-48.

LGTM. Clean, well-scoped preflight check. The fail-fast on connectivity + graceful fallback on plugin list is the right approach. This would have saved us days on PRI-28. One nit for later (non-blocking): consider caching the HEADLAMP_URL in a workflow-level env so it's reusable if we add more preflight checks. Approved — sending to QA via PRI-48.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: privilegedescalation/headlamp-polaris-plugin#24