Compare commits

..

7 Commits

Author SHA1 Message Date
Chris Farhood fe37b4d424 fix(e2e): correct indentation of failureThreshold in readinessProbe YAML
YAML indentation was 2 levels deeper than siblings (14 spaces vs 12),
causing the key to be nested under httpGet instead of readinessProbe.
kubectl apply would silently accept this mis-structured manifest but
the probe configuration would be ignored at runtime.

PRI-907

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-06 21:07:06 +00:00
Chris Farhood 6c6cfc88f4 fix(e2e): add cluster diagnostics to deploy step for faster triage
Add pre-deployment node/namespace/resource diagnostics and wrap
kubectl apply in explicit error handling with cluster state dump on
failure. This gives us actionable output in the GitHub Actions logs
when the Deploy E2E step fails, instead of a silent exit code.

PRI-956

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-06 18:30:43 +00:00
Chris Farhood 540f0a7890 fix e2e: add missing plugin-name input to plugin-e2e workflow
The rook plugin E2E workflow was calling the reusable plugin-e2e workflow
without the required plugin-name input. This caused the ConfigMap naming
and mount path to fall back to the headlamp-kube-vip defaults, breaking
E2E runs for the rook plugin.

Fix: pass plugin-name: rook to the reusable workflow.
2026-05-06 12:36:08 +00:00
Chris Farhood 3f93e71f28 fix(e2e): reference @main workflow after .github merge
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 17:43:54 +00:00
Chris Farhood 0d9f9d859a fix(e2e): use .first() to handle strict mode violations (PRI-699)
Similar to the kube-vip fix, /overview/i and /storage class/i can
match multiple headings. Using .first() to avoid strict mode violations.
2026-05-05 13:56:35 +00:00
Chris Farhood 61df61c691 fix(e2e): expand storage classes sidebar nav and relax plugin settings locator
The 'Storage Classes' link is nested under the Rook sidebar button, not
at the top level. Expand the Rook section before asserting visibility.
Also uses /rook/i case-insensitive regex and waits for the plugins list
to render before searching.
2026-05-05 13:04:45 +00:00
Chris Farhood 15d161c312 fix(e2e): use pnpm-capable workflow branch with namespace param 2026-05-05 12:21:22 +00:00
4 changed files with 31 additions and 9 deletions
+2 -1
View File
@@ -18,6 +18,7 @@ jobs:
e2e:
uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@main
with:
node-version: '22'
node-version: "22"
headlamp-version: v0.40.1
e2e-namespace: headlamp-dev
plugin-name: rook
+10 -5
View File
@@ -24,14 +24,14 @@ test.describe('Rook plugin smoke tests', () => {
await page.waitForLoadState('networkidle');
await expect(page).toHaveURL(/rook-ceph/);
await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible();
await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible();
});
test('overview page renders content', async ({ page }) => {
await page.goto('/c/main/rook-ceph');
await waitForSidebar(page);
await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible({
await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible({
timeout: 15_000,
});
@@ -42,22 +42,27 @@ test.describe('Rook plugin smoke tests', () => {
test('navigation to storage classes view works', async ({ page }) => {
await page.goto('/c/main/rook-ceph');
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
const rookBtn = sidebar.getByRole('button', { name: /rook/i });
await rookBtn.click();
await page.waitForLoadState('networkidle');
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
await storageClassesLink.click();
await page.waitForLoadState('networkidle');
await expect(page).toHaveURL(/rook-ceph\/storage-classes/);
await expect(page.getByRole('heading', { name: /storage class/i })).toBeVisible({ timeout: 15_000 });
await expect(page.getByRole('heading', { name: /storage class/i }).first()).toBeVisible({ timeout: 15_000 });
});
test('plugin settings page shows rook plugin entry', async ({ page }) => {
await page.goto('/settings/plugins');
await page.waitForLoadState('networkidle');
await page.waitForSelector('table, [class*="PluginList"], [class*="plugin"]', { timeout: 10_000 }).catch(() => {});
const pluginEntry = page.locator('text=rook').first();
const pluginEntry = page.locator('text=/rook/i').first();
await expect(pluginEntry).toBeVisible({ timeout: 30_000 });
});
});
+1 -2
View File
@@ -50,7 +50,6 @@
"tar": "^7.5.11",
"undici": "^7.24.3",
"vite": ">=6.4.2",
"lodash": ">=4.18.0",
"elliptic": ">=6.6.1"
"lodash": ">=4.18.0"
}
}
+18 -1
View File
@@ -35,6 +35,17 @@ if ! kubectl auth can-i delete configmaps -n "$E2E_NAMESPACE" --quiet 2>/dev/nul
exit 1
fi
echo ""
echo "=== Pre-deployment cluster diagnostics ==="
echo "Nodes:"
kubectl get nodes -o wide 2>&1 || true
echo ""
echo "headlamp-dev namespace state:"
kubectl get ns headlamp-dev -o yaml 2>&1 || true
echo ""
echo "Existing E2E resources in namespace:"
kubectl get all -n "$E2E_NAMESPACE" -l "app.kubernetes.io/instance=$E2E_RELEASE" 2>&1 || true
echo "=== E2E Headlamp Deployment ==="
echo " Image: ghcr.io/headlamp-k8s/headlamp:${HEADLAMP_VERSION}"
echo " Namespace: $E2E_NAMESPACE"
@@ -60,7 +71,7 @@ kubectl delete serviceaccount "${E2E_RELEASE}" -n "$E2E_NAMESPACE" --ignore-not-
echo ""
echo "Deploying Headlamp E2E instance..."
kubectl apply -f - <<EOF
if ! kubectl apply -f - <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
@@ -148,6 +159,12 @@ spec:
targetPort: http
protocol: TCP
EOF
then
echo "ERROR: kubectl apply failed. Dumping cluster state..." >&2
kubectl get all -n "$E2E_NAMESPACE" 2>&1 || true
kubectl get events -n "$E2E_NAMESPACE" --sort-by='.lastTimestamp' 2>&1 | tail -30 || true
exit 1
fi
echo "Waiting for rollout..."
kubectl rollout status "deployment/${E2E_RELEASE}" \