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
feat(deployment): Add new frontend system option (#98)
Add optional new-frontend-system (app-next) support on RHDHDeployment: merge
package NFS YAML with the same pipeline as common → auth → user (later wins),
instead of a separate loader path.
- Secrets: splice NFS secrets into mergeYamlFilesIfExists before a single
envsubst pass (common → auth → NFS when active → user).
- Dynamic plugins: splice config/new-frontend-system/dynamic-plugins.yaml after
auth and before workspace/generated config so NFS OCI entries act as defaults;
user dynamic-plugins.yaml and metadata still override.
- Layout: move NFS assets to config/new-frontend-system/ (secrets.yaml,
dynamic-plugins.yaml, value_file.yaml); group paths under
DEFAULT_CONFIG_PATHS.newFrontendSystem (secrets, dynamicPlugins, valueFile).
- Drop duplicate includes from the NFS dynamic-plugins fragment (common already
includes dynamic-plugins.default.yaml).
- Remove new-frontend-system-plugins.ts (env-based OCI overrides), its tests,
and RHDH_E2E_NFS_*_ENV exports; pin app-auth / app-integrations via standard
workspace dynamic-plugins.yaml.
- Auto-enable when configure() omits the flag if the namespace ends with
-app-next or USE_NEW_FRONTEND_SYSTEM=true; explicit useNewFrontendSystem
true/false still wins via ??.
Docs and tests updated for merge order, env var, and consumer migration notes.
Assisted-By: Cursor Desktop
rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
New frontend system defaults (config/new-frontend-system/)
90
92
↓ deep merge
91
93
User config (workspace's tests/config/*.yaml)
92
94
↓
93
95
= Final merged config
94
96
```
95
97
98
+
`useNewFrontendSystem` is true when set explicitly, when the namespace ends with `-app-next`, or when `USE_NEW_FRONTEND_SYSTEM=true`. Secrets use the same layer order, then a single `envsubst` pass on the merged result.
99
+
96
100
Array merge uses "replace" strategy by default. Plugin arrays use `byKey: "package"` with normalized keys (strips trailing `-dynamic`).
|`disableWrappers`|`string[]`| Wrapper plugins to disable (PR builds) |
62
+
|`useNewFrontendSystem`|`boolean`| New frontend system (app-next / NFS). Omit to auto-detect from namespace suffix `-app-next` or `USE_NEW_FRONTEND_SYSTEM=true`; set `false` to disable. See [RHDH deployment](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem)|
Copy file name to clipboardExpand all lines: docs/changelog.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,12 @@
2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
+
## [1.1.41] - Current
6
+
7
+
### Added
8
+
9
+
-**`useNewFrontendSystem`** — Backstage **app-next** / new frontend system: merges NFS layers from `config/new-frontend-system/` (secrets, default **app-auth** and **app-integrations** plugins, Helm `value_file.yaml`) into the same merge pipelines as common/auth/user. Secrets are merged with other layers **before** a single `envsubst` pass. NFS dynamic plugins act as **defaults** (workspace `tests/config/dynamic-plugins.yaml` overrides). **Auto-detection:** enabled when the namespace ends with `-app-next` or `USE_NEW_FRONTEND_SYSTEM=true`, unless `useNewFrontendSystem: false` is passed. Optional workspace `tests/config/value_file-app-next.yaml` is still merged last for Helm.
Copy file name to clipboardExpand all lines: docs/guide/configuration/config-files.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,10 @@ catalog:
46
46
47
47
Configure dynamic plugins:
48
48
49
+
::: tip `useNewFrontendSystem`
50
+
If you run against the **app-next** shell, enable the new frontend system (pass `useNewFrontendSystem: true`, use a project/namespace suffix **`-app-next`**, or set **`USE_NEW_FRONTEND_SYSTEM=true`** — see [RHDH deployment](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem)). The package merges default **app-auth** and **app-integrations** OCI plugins as **defaults**; override versions in this file when they must differ.
|`USE_NEW_FRONTEND_SYSTEM`| When `"true"`, enables new-frontend-system (app-next) merges when `useNewFrontendSystem` is not set in `configure()` options | - |
38
39
39
40
## Plugin Metadata Variables
40
41
@@ -53,6 +54,21 @@ These control automatic plugin configuration injection from metadata files.
53
54
|`JOB_NAME`| CI job name (set by OpenShift CI/Prow) | If contains `periodic-`, nightly mode is activated |
54
55
|`JOB_MODE`| CI-only: `nightly` or `pr-check` (set by step registry) | Informational |
55
56
57
+
## New frontend system (app-next)
58
+
59
+
NFS merge layers ship under `config/new-frontend-system/` in the package (secrets, dynamic plugins, Helm values), same layering idea as `auth/`.
60
+
61
+
**Enabling app-next behavior**
62
+
63
+
| Mechanism | Effect |
64
+
|-----------|--------|
65
+
|`useNewFrontendSystem: true` in [`configure()`](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem)| Explicit enable |
| Playwright project / namespace ends with `-app-next`| Auto-enabled when `useNewFrontendSystem` is omitted |
68
+
|`USE_NEW_FRONTEND_SYSTEM=true`| Auto-enabled for all namespaces when `useNewFrontendSystem` is omitted |
69
+
70
+
**Overriding default OCI refs** for **app-auth** and **app-integrations** uses the same pattern as other plugins: add or adjust entries in your workspace `tests/config/dynamic-plugins.yaml` (merged after package NFS defaults, so your versions win).
71
+
56
72
### OCI URL Generation
57
73
58
74
When `GIT_PR_NUMBER` is set, the package replaces local plugin paths with OCI URLs:
|[TypeScript Configuration](/guide/configuration/typescript-config)| Base TypeScript settings |
12
-
|[Environment Variables](/guide/configuration/environment-variables)| All environment variables |
12
+
|[Environment Variables](/guide/configuration/environment-variables)| All environment variables (including NFS / app-next, e.g. `USE_NEW_FRONTEND_SYSTEM`) |
13
13
|[Disabling Conflicting Wrappers](/guide/configuration/disable-wrappers)| Disabling pre-enabled wrappers that may cause configuration conflicts |
14
14
15
15
## Project Configuration
@@ -69,6 +69,8 @@ RHDH configurations are merged in layers:
69
69
70
70
This allows you to override only what you need while using sensible defaults.
71
71
72
+
For tests targeting the **new frontend system** (app-next), see [RHDH deployment — New frontend system](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) and [NFS-related options](/guide/configuration/environment-variables#new-frontend-system-app-next).
73
+
72
74
## Plugin Metadata Injection
73
75
74
76
For PR builds, the package can automatically inject plugin configurations from metadata files. See [Plugin Metadata Injection](/guide/configuration/config-files#plugin-metadata-injection) for details.
|`disableWrappers`|`string[]`| Wrapper plugin package names to disable (`GIT_PR_NUMBER` flows) |
61
+
|`useNewFrontendSystem`|`boolean`| Enables the Backstage **new frontend system** shell (app-next / NFS): merges app-next secrets, default OCI **app-auth** and **app-integrations** plugins (as defaults — override in `tests/config/dynamic-plugins.yaml`), and extra Helm values from `config/new-frontend-system/value_file.yaml` plus optional `tests/config/value_file-app-next.yaml`. Omit to **auto-detect**: on when the namespace ends with `-app-next` or `USE_NEW_FRONTEND_SYSTEM=true`. Pass `false` to force off. |
62
+
63
+
### New frontend system (`useNewFrontendSystem`)
64
+
65
+
Use the **app-next** frontend when any of these apply:
66
+
67
+
- You pass `useNewFrontendSystem: true` in **`configure()`** (explicit), or
68
+
- The Playwright project name (which becomes the Kubernetes namespace) ends with **`-app-next`**, or
69
+
- You set environment variable **`USE_NEW_FRONTEND_SYSTEM=true`**
70
+
71
+
Pass **`useNewFrontendSystem: false`** to run in a `-app-next` namespace without NFS layers.
72
+
73
+
Typical explicit flow:
74
+
75
+
```typescript
76
+
awaitrhdh.configure({
77
+
auth: "keycloak",
78
+
useNewFrontendSystem: true,
79
+
});
80
+
awaitrhdh.deploy();
81
+
```
82
+
83
+
With a project named e.g. `my-plugin-app-next`, you can omit the flag and still get NFS merges:
84
+
85
+
```typescript
86
+
awaitrhdh.configure({ auth: "keycloak" });
87
+
awaitrhdh.deploy();
88
+
```
89
+
90
+
What gets merged (same order as other config: package defaults → auth → NFS defaults → your workspace files; later wins; secrets are merged then **envsubst** runs once on the result):
91
+
92
+
1.**Secrets** — `APP_CONFIG_app_packageName: app-next` and `ENABLE_STANDARD_MODULE_FEDERATION: "true"` (your `rhdh-secrets.yaml` still wins on conflicts and can use `$VAR` substitution).
93
+
2.**Dynamic plugins** — Default OCI refs for `red-hat-developer-hub-backstage-plugin-app-auth` and `...-app-integrations` from package YAML; override pins in **`tests/config/dynamic-plugins.yaml`** (same as other plugins).
94
+
3.**Helm** — Package `config/new-frontend-system/value_file.yaml`, then your `value_file.yaml`, then optional `tests/config/value_file-app-next.yaml` when that file exists.
95
+
96
+
Workspace-specific **app-config** (titles, plugin routes, etc.) remains your responsibility.
`deploy()` automatically skips if the deployment already succeeded in the current test run (e.g., after a worker restart due to test failure). This prevents expensive re-deployments.
Copy file name to clipboardExpand all lines: docs/overlay/reference/environment-variables.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,14 @@ See [Running Locally - Secrets from Vault](/overlay/tutorials/running-locally#se
42
42
|`INSTALLATION_METHOD`| Deployment method: `helm` or `operator`|`helm`| No |
43
43
|`CHART_URL`| Custom Helm chart URL |`oci://quay.io/rhdh/chart`| No |
44
44
45
+
### New frontend system (app-next / NFS)
46
+
47
+
When the new frontend system is active (see [`useNewFrontendSystem`](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) and [environment variables](/guide/configuration/environment-variables#new-frontend-system-app-next)), the package merges NFS defaults then your workspace files. Pin **app-auth** / **app-integrations** OCI refs in `tests/config/dynamic-plugins.yaml` like any other plugin (your file wins over package defaults).
48
+
49
+
| Variable | Description |
50
+
|----------|-------------|
51
+
|`USE_NEW_FRONTEND_SYSTEM`| When `"true"`, enables NFS merges if `useNewFrontendSystem` is not set in `configure()` options |
**All of these files are optional.** Only create them when you need to override or extend defaults.
34
35
36
+
## `useNewFrontendSystem` (app-next / NFS)
37
+
38
+
When the new frontend system is enabled (see [`configure()`](/guide/deployment/rhdh-deployment#configureoptions) and [New frontend system](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem)), `@red-hat-developer-hub/e2e-test-utils` merges:
39
+
40
+
-**Secrets** — `APP_CONFIG_app_packageName=app-next` and `ENABLE_STANDARD_MODULE_FEDERATION=true` into the `rhdh-secrets` Secret (merged with common/auth/workspace layers before `envsubst`; you no longer need duplicate keys in a separate `rhdh-secrets-next.yaml` for that).
41
+
-**Dynamic plugins** — Default OCI entries for **app-auth** and **app-integrations** as package defaults; override versions in `tests/config/dynamic-plugins.yaml` ([guide](/guide/configuration/config-files#dynamic-pluginsyaml)).
42
+
43
+
You can **remove** hand-maintained `app-auth` / `app-integrations` lines from `dynamic-plugins.yaml` when the framework defaults match your train.
44
+
45
+
Optional **`value_file-app-next.yaml`** is merged last when the new frontend system is active and the file exists — use for chart tweaks specific to app-next runs.
46
+
35
47
## app-config-rhdh.yaml (Optional)
36
48
37
49
The main RHDH configuration file. This file is merged with default configurations from `@red-hat-developer-hub/e2e-test-utils`.
0 commit comments