Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default defineConfig({
{ text: "Examples", link: "/examples/" },
{ text: "Overlay Testing", link: "/overlay/" },
{
text: "v1.1.34",
text: "v1.1.35",
items: [{ text: "Changelog", link: "/changelog" }],
},
],
Expand Down
8 changes: 7 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

All notable changes to this project will be documented in this file.

## [1.1.34] - Current
## [1.1.35] - Current

### Fixed

- **Resilient namespace deletion in TeardownReporter**: Retry once with 5s delay and catch errors to prevent cluster connectivity failures (e.g. DNS `EAI_AGAIN`) from crashing Playwright before it generates the HTML report.

## [1.1.34]

### Added

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@red-hat-developer-hub/e2e-test-utils",
"version": "1.1.34",
"version": "1.1.35",
"description": "Test utilities for RHDH E2E tests",
"license": "Apache-2.0",
"repository": {
Expand Down
17 changes: 15 additions & 2 deletions src/playwright/teardown-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,26 @@ export default class TeardownReporter implements Reporter {
}
}

// Delete namespaces only in CI
// Retry + catch to avoid crashing Playwright if the cluster becomes unreachable.
const maxAttempts = 2;
if (process.env.CI === "true") {
for (const ns of namespaces) {
console.log(
`[TeardownReporter] Deleting namespace "${ns}" (project: ${projectName})`,
);
await k8sClient.deleteNamespace(ns);
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
try {
await k8sClient.deleteNamespace(ns);
break;
} catch (error) {
console.error(
`[TeardownReporter] Failed to delete namespace "${ns}" (attempt ${attempt}/${maxAttempts}):`,
error,
);
if (attempt < maxAttempts)
await new Promise((r) => setTimeout(r, 5000));
}
}
}
}
}
Expand Down
Loading