Skip to content

Commit 7c34cb8

Browse files
feat(deployment): make deploy() timeout configurable (#46)
1 parent 273e644 commit 7c34cb8

File tree

12 files changed

+76
-17
lines changed

12 files changed

+76
-17
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineConfig({
3333
{ text: "Examples", link: "/examples/" },
3434
{ text: "Overlay Testing", link: "/overlay/" },
3535
{
36-
text: "v1.1.10",
36+
text: "v1.1.12",
3737
items: [{ text: "Changelog", link: "/changelog" }],
3838
},
3939
],

docs/api/deployment/rhdh-deployment.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ await rhdh.configure({
7070
### `deploy()`
7171

7272
```typescript
73-
async deploy(): Promise<void>
73+
async deploy(options?: { timeout?: number | null }): Promise<void>
7474
```
7575

7676
Deploy RHDH to the cluster. This:
@@ -80,8 +80,23 @@ Deploy RHDH to the cluster. This:
8080
4. Installs RHDH via Helm or Operator
8181
5. Waits for deployment to be ready
8282

83+
| Parameter | Type | Default | Description |
84+
|-----------|------|---------|-------------|
85+
| `options.timeout` | `number \| null` | `600_000` | Playwright test timeout (ms) for the deployment. Pass a custom number to override, `0` for no timeout, or `null` to skip and let the consumer control the timeout. |
86+
8387
```typescript
88+
// Default (600s timeout)
8489
await rhdh.deploy();
90+
91+
// Custom timeout (15 minutes)
92+
await rhdh.deploy({ timeout: 900_000 });
93+
94+
// No timeout (infinite)
95+
await rhdh.deploy({ timeout: 0 });
96+
97+
// Skip — consumer controls the timeout
98+
test.setTimeout(900_000);
99+
await rhdh.deploy({ timeout: null });
85100
```
86101

87102
### `waitUntilReady()`

docs/changelog.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

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

5-
## [1.1.10] - Current
5+
## [1.1.12] - Current
6+
7+
### Changed
8+
- **`deploy()` timeout is now configurable**: `deploy()` accepts an optional `{ timeout }` parameter to control the Playwright test timeout during deployment. Defaults to `600_000` (600s). Pass a custom number to override, `0` for no timeout (infinite), or `null` to skip setting the timeout entirely and let the consumer control it.
9+
10+
## [1.1.11]
11+
12+
### Added
13+
- **`runQuietUnlessFailure()`**: New utility that captures command output silently on success and displays full output on failure for better debugging. Used in Keycloak deployment for `helm repo update` and `helm upgrade --install`.
14+
15+
## [1.1.10]
616

717
### Fixed
818
- **`plugins-list.yaml` parsing**: Parse as proper YAML instead of text splitting, correctly handling entries with build flags (e.g., `--embed-package`, `--suppress-native-package`) and YAML comments.

docs/guide/deployment/rhdh-deployment.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,31 @@ await deployment.configure({
8585
});
8686
```
8787

88-
### `deploy()`
88+
### `deploy(options?)`
8989

9090
Deploy RHDH to the cluster:
9191

9292
```typescript
9393
await deployment.deploy();
9494
```
9595

96+
The `deploy()` method accepts an optional `{ timeout }` parameter to control the Playwright test timeout during deployment. By default, it sets the timeout to 600 seconds (10 minutes).
97+
98+
```typescript
99+
// Default (600s)
100+
await rhdh.deploy();
101+
102+
// Custom timeout (15 minutes)
103+
await rhdh.deploy({ timeout: 900_000 });
104+
105+
// No timeout (infinite)
106+
await rhdh.deploy({ timeout: 0 });
107+
108+
// Skip — let the consumer control the timeout
109+
test.setTimeout(900_000);
110+
await rhdh.deploy({ timeout: null });
111+
```
112+
96113
This method:
97114
1. Merges configuration files (common → auth → project)
98115
2. [Injects plugin metadata](/guide/configuration/config-files#plugin-metadata-injection) into dynamic plugins config

docs/overlay/examples/basic-plugin.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ workspaces/<plugin>/e2e-tests/
5656
"lint:fix": "eslint . --fix",
5757
"prettier:check": "prettier --check .",
5858
"prettier:fix": "prettier --write .",
59-
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check"
59+
"tsc:check": "tsc --noEmit",
60+
"check": "yarn tsc:check && yarn lint:check && yarn prettier:check"
6061
},
6162
"devDependencies": {
6263
"@eslint/js": "^9.39.2",
@@ -67,7 +68,7 @@ workspaces/<plugin>/e2e-tests/
6768
"eslint-plugin-check-file": "^3.3.1",
6869
"eslint-plugin-playwright": "^2.4.0",
6970
"prettier": "^3.7.4",
70-
"@red-hat-developer-hub/e2e-test-utils": "1.1.10",
71+
"@red-hat-developer-hub/e2e-test-utils": "1.1.12",
7172
"typescript": "^5.9.3",
7273
"typescript-eslint": "^8.50.0"
7374
}

docs/overlay/examples/tech-radar.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ workspaces/tech-radar/e2e-tests/
5959
"lint:fix": "eslint . --fix",
6060
"prettier:check": "prettier --check .",
6161
"prettier:fix": "prettier --write .",
62-
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check"
62+
"tsc:check": "tsc --noEmit",
63+
"check": "yarn tsc:check && yarn lint:check && yarn prettier:check"
6364
},
6465
"devDependencies": {
6566
"@eslint/js": "^9.39.2",
@@ -70,7 +71,7 @@ workspaces/tech-radar/e2e-tests/
7071
"eslint-plugin-check-file": "^3.3.1",
7172
"eslint-plugin-playwright": "^2.4.0",
7273
"prettier": "^3.7.4",
73-
"@red-hat-developer-hub/e2e-test-utils": "1.1.10",
74+
"@red-hat-developer-hub/e2e-test-utils": "1.1.12",
7475
"typescript": "^5.9.3",
7576
"typescript-eslint": "^8.50.0"
7677
}

docs/overlay/reference/scripts.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ Auto-format code:
110110
yarn prettier:fix
111111
```
112112

113+
### yarn tsc:check
114+
115+
Run TypeScript type checking:
116+
117+
```bash
118+
yarn tsc:check
119+
```
120+
113121
### yarn check
114122

115123
Run all quality checks:
@@ -120,7 +128,7 @@ yarn check
120128

121129
Equivalent to:
122130
```bash
123-
tsc --noEmit && yarn lint:check && yarn prettier:check
131+
yarn tsc:check && yarn lint:check && yarn prettier:check
124132
```
125133

126134
## Script Definitions
@@ -138,7 +146,8 @@ Standard `package.json` scripts section:
138146
"lint:fix": "eslint . --fix",
139147
"prettier:check": "prettier --check .",
140148
"prettier:fix": "prettier --write .",
141-
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check"
149+
"tsc:check": "tsc --noEmit",
150+
"check": "yarn tsc:check && yarn lint:check && yarn prettier:check"
142151
}
143152
}
144153
```

docs/overlay/test-structure/directory-layout.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ Defines the test package with dependencies and scripts:
5656
"lint:fix": "eslint . --fix",
5757
"prettier:check": "prettier --check .",
5858
"prettier:fix": "prettier --write .",
59-
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check"
59+
"tsc:check": "tsc --noEmit",
60+
"check": "yarn tsc:check && yarn lint:check && yarn prettier:check"
6061
},
6162
"devDependencies": {
6263
"@eslint/js": "^9.39.2",
@@ -67,7 +68,7 @@ Defines the test package with dependencies and scripts:
6768
"eslint-plugin-check-file": "^3.3.1",
6869
"eslint-plugin-playwright": "^2.4.0",
6970
"prettier": "^3.7.4",
70-
"@red-hat-developer-hub/e2e-test-utils": "1.1.10",
71+
"@red-hat-developer-hub/e2e-test-utils": "1.1.12",
7172
"typescript": "^5.9.3",
7273
"typescript-eslint": "^8.50.0"
7374
}

docs/overlay/tutorials/new-workspace.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Create `package.json` with the following content:
5252
"lint:fix": "eslint . --fix",
5353
"prettier:check": "prettier --check .",
5454
"prettier:fix": "prettier --write .",
55-
"check": "tsc --noEmit && yarn lint:check && yarn prettier:check"
55+
"tsc:check": "tsc --noEmit",
56+
"check": "yarn tsc:check && yarn lint:check && yarn prettier:check"
5657
},
5758
"devDependencies": {
5859
"@eslint/js": "^9.39.2",

docs/overlay/tutorials/running-locally.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ test.beforeEach(async ({ page }) => {
192192
### Type Checking
193193

194194
```bash
195-
yarn tsc --noEmit
195+
yarn tsc:check
196196
```
197197

198198
### Linting

0 commit comments

Comments
 (0)