You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/changelog.md
+50-10Lines changed: 50 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,131 +2,164 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
-
## [1.1.14] - Current
5
+
## [1.1.15] - Current
6
6
7
7
### Added
8
+
9
+
-**`RbacApiHelper`**: New HTTP client for the RHDH RBAC permission API (`/api/permission/`). Uses a static `build(token)` factory to asynchronously initialise a Playwright `APIRequestContext`. Provides `getPoliciesByRole()`, `getConditions()`, `getConditionsByRole()`, `deleteRole()`, `deletePolicy()`, and `deleteCondition()` for managing roles, policies, and conditional permission policies — primarily intended for `afterAll` cleanup. Exported from `@red-hat-developer-hub/e2e-test-utils/helpers`.
10
+
-**`AuthApiHelper`**: New helper for retrieving Backstage identity tokens from a running RHDH instance via the auth refresh endpoint (`/api/auth/{provider}/refresh`). Accepts an existing Playwright `Page` and exposes a single `getToken(provider?, environment?)` method. Defaults to the `oidc` provider and `production` environment. Typically used in `beforeAll` to obtain a token for `RbacApiHelper.build()`. Exported from `@red-hat-developer-hub/e2e-test-utils/helpers`.
11
+
-**`Response`** utility class (exported alongside `RbacApiHelper`): provides `Response.removeMetadataFromResponse(apiResponse)` to strip server-added `metadata` fields from policy arrays before passing them to delete endpoints.
12
+
13
+
## [1.1.14]
14
+
15
+
### Added
16
+
8
17
-**`deploy()` built-in protection**: `rhdh.deploy()` now automatically skips if the deployment already succeeded in the current test run. No code changes needed — existing `beforeAll` patterns work as before, but deployments are no longer repeated when Playwright restarts workers after test failures.
9
18
-**`test.runOnce(key, fn)`**: Execute any function exactly once per test run, even across worker restarts. Use for expensive pre-deploy operations (external services, setup scripts, data seeding) that `deploy()` alone doesn't cover. Safe to nest with `deploy()`'s built-in protection.
10
19
-**Teardown reporter**: Built-in Playwright reporter that automatically deletes Kubernetes namespaces after all tests complete. Active only in CI (`process.env.CI`).
11
20
-**`registerTeardownNamespace(projectName, namespace)`**: Register custom namespaces for automatic cleanup. Import from `@red-hat-developer-hub/e2e-test-utils/teardown`.
12
21
13
22
### Changed
23
+
14
24
- Namespace cleanup moved from worker fixture to teardown reporter to prevent premature deletion on test failures.
15
25
16
26
## [1.1.13]
17
27
18
28
### Added
29
+
19
30
- Support for GitHub authentication provider
20
31
21
32
### Changed
22
-
-`LoginHelper.loginAsGithubUser` now pulls default user credentials from the following vault keys: `VAULT_GH_USER_ID`, `VAULT_GH_USER_PASS`, `VAULT_GH_2FA_SECRET`
33
+
34
+
-`LoginHelper.loginAsGithubUser` now pulls default user credentials from the following vault keys: `VAULT_GH_USER_ID`, `VAULT_GH_USER_PASS`, `VAULT_GH_2FA_SECRET`
23
35
-`APIHelper.githubRequest` pulls default user token from vault key `VAULT_GITHUB_USER_TOKEN`
24
36
25
37
### Environment Variables
26
-
-`VAULT_GITHUB_OAUTH_OVERLAYS_APP_ID` - ID for GitHub OAuth application used as auth provider
27
-
-`VAULT_GITHUB_OAUTH_OVERLAYS_APP_SECRET`- Client secret for GitHub OAuth application
28
-
-`VAULT_GH_USER_ID` - GitHub user name
29
-
-`VAULT_GH_USER_PASS` - GitHub user password
30
-
-`VAULT_GH_2FA_SECRET` - GitHub user secret for 2 factor authentication
31
-
-`VAULT_GITHUB_USER_TOKEN` - Github user token
38
+
39
+
-`VAULT_GITHUB_OAUTH_OVERLAYS_APP_ID` - ID for GitHub OAuth application used as auth provider
40
+
-`VAULT_GITHUB_OAUTH_OVERLAYS_APP_SECRET`- Client secret for GitHub OAuth application
41
+
-`VAULT_GH_USER_ID` - GitHub user name
42
+
-`VAULT_GH_USER_PASS` - GitHub user password
43
+
-`VAULT_GH_2FA_SECRET` - GitHub user secret for 2 factor authentication
44
+
-`VAULT_GITHUB_USER_TOKEN` - Github user token
32
45
33
46
## [1.1.12] - Current
34
47
35
48
### Changed
49
+
36
50
-**`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.
37
51
38
52
## [1.1.11]
39
53
40
54
### Added
55
+
41
56
-**`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`.
42
57
43
58
## [1.1.10]
44
59
45
60
### Fixed
61
+
46
62
-**`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.
47
63
48
64
### Changed
65
+
49
66
-**Video recording**: Changed mode from `"on"` to `"retain-on-failure"` and reduced size from `1920x1080` to `1280x720` to save disk space.
50
67
-**Workers and retries**: Now configurable via `PLAYWRIGHT_WORKERS` (default: `"50%"`) and `PLAYWRIGHT_RETRIES` (default: `0`) environment variables.
51
68
52
69
## [1.1.9]
53
70
54
71
### Fixed
72
+
55
73
-**OCI URL replacement with user-provided `dynamic-plugins.yaml`**: When a workspace provides its own `dynamic-plugins.yaml`, plugin package paths were not replaced with OCI URLs for PR builds. Extracted shared `replaceWithOCIUrls()` function so both `generateDynamicPluginsConfigFromMetadata()` and `loadAndInjectPluginMetadata()` code paths now perform OCI replacement when `GIT_PR_NUMBER` is set.
56
74
57
75
## [1.1.8]
58
76
59
77
### Fixed
78
+
60
79
- Fixed namespace deletion race condition during test retries
61
80
- Improved 404 error detection for different Kubernetes client versions
62
81
63
82
### Changed
83
+
64
84
- Increased default timeouts (300s → 500s) and test timeout (600s)
65
85
- Reduced CI retries from 2 to 1
66
86
- Added pod diagnostics logging on timeout and periodic status updates
67
87
68
88
## [1.1.7]
69
89
70
90
### Fixed
91
+
71
92
-**Secrets with control characters**: Fixed `SyntaxError: Bad control character in string literal` when secrets contain newlines or special characters (e.g., GitHub App private keys)
72
93
73
94
### Dependencies
95
+
74
96
- Added `lodash.clonedeepwith@^4.5.0` for safe environment variable substitution
75
97
76
98
## [1.1.6]
77
99
78
100
### Added
101
+
79
102
-**"next" tag support**: Both Helm and Operator deployments now support `RHDH_VERSION=next`
80
103
- Helm: Resolves "next" to semantic version by querying `rhdh-hub-rhel9` image tags
81
104
- Operator: Uses `main` branch and `--next` flag instead of release branch
82
105
83
106
### Changed
107
+
84
108
-**Default values**: `RHDH_VERSION` defaults to `next` and `INSTALLATION_METHOD` defaults to `helm` when not set
85
109
86
110
### Environment Variables
111
+
87
112
-`RHDH_VERSION`: RHDH version to deploy (default: `next`)
88
113
-`INSTALLATION_METHOD`: Deployment method - `helm` or `operator` (default: `helm`)
89
114
90
115
## [1.1.5]
91
116
92
117
### Added
118
+
93
119
-**Plugin metadata auto-generation**: When `dynamic-plugins.yaml` doesn't exist, configuration is automatically generated from `metadata/*.yaml` files
94
120
-**OCI URL generation for PR builds**: When `GIT_PR_NUMBER` is set, local plugin paths are replaced with OCI URLs (e.g., `oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/my-plugin:pr_1234__1.0.0`)
95
121
- Plugin metadata injection into existing `dynamic-plugins.yaml` configurations
96
122
- New utilities: `shouldInjectPluginMetadata()`, `generateDynamicPluginsConfigFromMetadata()`, `loadAndInjectPluginMetadata()`, `extractPluginName()`
97
123
-**Early pod failure detection**: `waitForPodsWithFailureDetection()` in KubernetesClientHelper detects CrashLoopBackOff, ImagePullBackOff, init container failures, etc. within seconds instead of waiting for full timeout
98
124
99
125
### Changed
126
+
100
127
- Plugin versions for OCI URLs are fetched from source repo's `package.json` using `source.json` commit ref
`getToken` throws on HTTP errors or if the token is missing from the response body. Wrap calls in a try/catch when you need to handle failures gracefully:
@@ -114,3 +78,4 @@ try {
114
78
-[RbacApiHelper](/guide/helpers/rbac-api-helper) — uses tokens obtained from `AuthApiHelper`
115
79
-[LoginHelper](/guide/helpers/login-helper) — authenticates the browser session before calling `getToken`
116
80
-[APIHelper](/guide/helpers/api-helper) — catalog and GitHub API operations
81
+
-[Common Patterns](/overlay/reference/patterns#fetching-a-token-to-use-with-rbacapihelper) — example of using `getToken` with `RbacApiHelper`
A common pattern is to retrieve a Backstage identity token after login and pass it to `RbacApiHelper` (or another API helper) to make authenticated API calls:
30
+
31
+
```typescript
32
+
import { test } from'@red-hat-developer-hub/e2e-test-utils/test';
0 commit comments