Skip to content

Commit 8ec61b2

Browse files
committed
feat(deployment): Add new frontend system option
This change adds a useNewFrontendSystem option to configure the RHDH deployment to load the new frontend system app-next package instead of the old frontend system app package. This change also adds the relevant plugins in this mode that are required for logging in using other authentication providers than the guest login as well as source control authentication support. Tests that want to use the new frontend system simply need to set useNewFrontendSystem to "true" in the options object for rhdh.configure(). Assisted-By: Cursor Desktop rh-pre-commit.version: 2.3.2 rh-pre-commit.check-secrets: ENABLED
1 parent dbdd278 commit 8ec61b2

20 files changed

Lines changed: 317 additions & 12 deletions

docs/api/deployment/deployment-types.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ type DeploymentOptions = {
4242
method?: DeploymentMethod;
4343
valueFile?: string;
4444
subscription?: string;
45+
disableWrappers?: string[];
46+
useNewFrontendSystem?: boolean;
4547
};
4648
```
4749

@@ -56,6 +58,8 @@ type DeploymentOptions = {
5658
| `method` | `DeploymentMethod` | Installation method |
5759
| `valueFile` | `string` | Helm values file (Helm only) |
5860
| `subscription` | `string` | Backstage CR file (Operator only) |
61+
| `disableWrappers` | `string[]` | Wrapper plugins to disable (PR builds) |
62+
| `useNewFrontendSystem` | `boolean` | New frontend system (app-next / NFS shell); see [RHDH deployment](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) |
5963

6064
## DeploymentConfigBase
6165

@@ -67,6 +71,8 @@ type DeploymentConfigBase = {
6771
appConfig: string;
6872
secrets: string;
6973
dynamicPlugins: string;
74+
disableWrappers: string[];
75+
useNewFrontendSystem: boolean;
7076
};
7177
```
7278

docs/changelog.md

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

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

5-
## [1.1.37] - Current
5+
## [1.1.38] - Current
6+
7+
### Added
8+
9+
- **`useNewFrontendSystem`** — Optional flag on `rhdh.configure()` for Backstage **app-next** / new frontend system tests: merges `APP_CONFIG_app_packageName` and `ENABLE_STANDARD_MODULE_FEDERATION` into `rhdh-secrets`, adds default OCI dynamic plugins for **app-auth** and **app-integrations**, optional Helm merge layers (`value_file.new-frontend.yaml`, workspace `tests/config/value_file-app-next.yaml`). Env overrides: `RHDH_E2E_NFS_APP_AUTH_PACKAGE`, `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE` (full `oci://` refs). Exported constants `RHDH_E2E_NFS_APP_AUTH_PACKAGE_ENV` and `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE_ENV`. Types re-exported from `@red-hat-developer-hub/e2e-test-utils/rhdh`.
10+
11+
## [1.1.37]
612

713
### Added
814

docs/guide/configuration/config-files.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ catalog:
4646
4747
Configure dynamic plugins:
4848
49+
::: tip `useNewFrontendSystem`
50+
If you run against the **app-next** shell, set `useNewFrontendSystem: true` on [`configure()`](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) so the package merges default **app-auth** and **app-integrations** OCI plugins (and optional [env overrides](/guide/configuration/environment-variables#new-frontend-system-app-next-shell-plugins)). You can then omit those entries from this file when the defaults match your train.
51+
:::
52+
4953
```yaml
5054
includes:
5155
- dynamic-plugins.default.yaml

docs/guide/configuration/environment-variables.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ These control automatic plugin configuration injection from metadata files:
4848
| `JOB_NAME` | CI job name (set by OpenShift CI/Prow) | If contains `periodic-`, injection is disabled |
4949
| `JOB_MODE` | CI-only: `nightly` or `pr-check` (set by step registry) | Informational |
5050

51+
## New frontend system (app-next shell plugins)
52+
53+
When [`useNewFrontendSystem`](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) is `true`, the package adds default OCI packages for **app-auth** and **app-integrations**. You can override each with a **full** `oci://` reference (optional):
54+
55+
| Variable | Description | Default |
56+
|----------|-------------|---------|
57+
| `RHDH_E2E_NFS_APP_AUTH_PACKAGE` | Full `oci://` package ref for `red-hat-developer-hub-backstage-plugin-app-auth` | Baked default in package YAML |
58+
| `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE` | Full `oci://` package ref for `red-hat-developer-hub-backstage-plugin-app-integrations` | Baked default in package YAML |
59+
60+
If an env var is **unset**, the default ref from the package is used. If set, it **replaces** that plugin entry (useful in CI to pin versions without publishing a new `@red-hat-developer-hub/e2e-test-utils` release).
61+
62+
Constants matching these names are exported as `RHDH_E2E_NFS_APP_AUTH_PACKAGE_ENV` and `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE_ENV` from `@red-hat-developer-hub/e2e-test-utils/rhdh`.
63+
5164
### OCI URL Generation
5265

5366
When `GIT_PR_NUMBER` is set, the package replaces local plugin paths with OCI URLs:

docs/guide/configuration/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The package provides configuration tools for ESLint, TypeScript, and RHDH deploy
99
| [Configuration Files](/guide/configuration/config-files) | YAML configuration structure |
1010
| [ESLint Configuration](/guide/configuration/eslint-config) | Pre-configured ESLint rules |
1111
| [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 shell plugin overrides) |
1313
| [Disabling Conflicting Wrappers](/guide/configuration/disable-wrappers) | Disabling pre-enabled wrappers that may cause configuration conflicts |
1414

1515
## Project Configuration
@@ -69,6 +69,8 @@ RHDH configurations are merged in layers:
6969
7070
This allows you to override only what you need while using sensible defaults.
7171
72+
For tests targeting the **new frontend system** (app-next), see [`useNewFrontendSystem`](/guide/deployment/rhdh-deployment#new-frontend-system-usenewfrontendsystem) on `configure()` and [NFS-related environment variables](/guide/configuration/environment-variables#new-frontend-system-app-next-shell-plugins).
73+
7274
## Plugin Metadata Injection
7375
7476
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.

docs/guide/deployment/rhdh-deployment.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,30 @@ test("example", async ({ rhdh }) => {
5757
| `dynamicPlugins` | `string` | Path to dynamic-plugins YAML |
5858
| `valueFile` | `string` | Helm values file (Helm only) |
5959
| `subscription` | `string` | Backstage CR file (Operator only) |
60+
| `disableWrappers` | `string[]` | Wrapper plugin package names to disable (`GIT_PR_NUMBER` flows) |
61+
| `useNewFrontendSystem` | `boolean` | When `true`, enables the Backstage **new frontend system** shell (app-next): merges `APP_CONFIG_app_packageName` / `ENABLE_STANDARD_MODULE_FEDERATION` into `rhdh-secrets`, adds OCI **app-auth** and **app-integrations** dynamic plugins (with optional env overrides — see [Environment Variables](/guide/configuration/environment-variables#new-frontend-system-app-next-shell-plugins)), and merges extra Helm values (`value_file.new-frontend.yaml`, optional workspace `tests/config/value_file-app-next.yaml`). Defaults to `false`. |
62+
63+
### New frontend system (`useNewFrontendSystem`)
64+
65+
Set `useNewFrontendSystem: true` in **`configure()`** when tests must run against the **app-next** frontend (often called NFS in docs). Typical flow:
66+
67+
```typescript
68+
await rhdh.configure({
69+
auth: "keycloak",
70+
useNewFrontendSystem: true,
71+
});
72+
await rhdh.deploy();
73+
```
74+
75+
Do **not** rely on the worker fixture’s argument-free `configure()` call for this flag — pass it in `beforeAll` with the rest of your deployment options **before** `deploy()`, as you do for `auth` and custom config paths.
76+
77+
What gets merged:
78+
79+
1. **Secrets**`APP_CONFIG_app_packageName: app-next` and `ENABLE_STANDARD_MODULE_FEDERATION: "true"` (workspace `rhdh-secrets.yaml` still supplies plugin-specific secrets).
80+
2. **Dynamic plugins** — Default OCI refs for `red-hat-developer-hub-backstage-plugin-app-auth` and `...-app-integrations`, overridable via `RHDH_E2E_NFS_APP_AUTH_PACKAGE` and `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE` (full `oci://` URIs).
81+
3. **Helm** — Package merge layer `config/helm/value_file.new-frontend.yaml` (shipped with the package), then your `value_file.yaml`, then optional `tests/config/value_file-app-next.yaml` when that file exists.
82+
83+
Workspace-specific **app-config** (titles, plugin routes, etc.) remains your responsibility.
6084

6185
### Example: Full Configuration
6286

@@ -114,12 +138,13 @@ await rhdh.deploy({ timeout: null });
114138

115139
This method:
116140
1. Merges configuration files (common → auth → project)
117-
2. [Injects plugin metadata](/guide/configuration/config-files#plugin-metadata-injection) into dynamic plugins config
118-
3. Applies ConfigMaps (app-config, dynamic-plugins)
119-
4. Applies Secrets (with environment variable substitution)
120-
5. Installs RHDH via Helm or Operator
121-
6. Waits for the deployment to be ready
122-
7. Sets `RHDH_BASE_URL` environment variable
141+
2. Optionally applies **new frontend system** merges when [`useNewFrontendSystem`](#deploymentoptions) was set on `configure()` (secrets, optional OCI shell plugins, Helm layers)
142+
3. [Injects plugin metadata](/guide/configuration/config-files#plugin-metadata-injection) into dynamic plugins config
143+
4. Applies ConfigMaps (app-config, dynamic-plugins)
144+
5. Applies Secrets (with environment variable substitution)
145+
6. Installs RHDH via Helm or Operator
146+
7. Waits for the deployment to be ready
147+
8. Sets `RHDH_BASE_URL` environment variable
123148

124149
#### Base URL format
125150

docs/overlay/reference/environment-variables.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ See [Running Locally - Secrets from Vault](/overlay/tutorials/running-locally#se
4242
| `INSTALLATION_METHOD` | Deployment method: `helm` or `operator` | `helm` | No |
4343
| `CHART_URL` | Custom Helm chart URL | `oci://quay.io/rhdh/chart` | No |
4444

45+
### New frontend system (optional OCI overrides)
46+
47+
Used when tests call `configure({ useNewFrontendSystem: true })`. Same semantics as the [guide environment reference](/guide/configuration/environment-variables#new-frontend-system-app-next-shell-plugins): full `oci://` refs; unset keeps package defaults.
48+
49+
| Variable | Description |
50+
|----------|-------------|
51+
| `RHDH_E2E_NFS_APP_AUTH_PACKAGE` | Override default OCI ref for app-auth |
52+
| `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE` | Override default OCI ref for app-integrations |
53+
54+
Set these in Vault or CI job env when you need to pin shell plugin versions per pipeline.
55+
4556
### Cluster Configuration
4657

4758
| Variable | Description | Default | Required |

docs/overlay/test-structure/configuration-files.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,23 @@ tests/config/
2727
├── rhdh-secrets.yaml # Kubernetes secrets (optional)
2828
├── dynamic-plugins.yaml # Dynamic plugins (optional - usually not needed)
2929
├── value_file.yaml # Helm values override (optional, Helm only)
30+
├── value_file-app-next.yaml # Extra Helm values when useNewFrontendSystem is true (optional)
3031
└── subscription.yaml # Operator subscription (optional, Operator only)
3132
```
3233

3334
**All of these files are optional.** Only create them when you need to override or extend defaults.
3435

36+
## `useNewFrontendSystem` (app-next / NFS)
37+
38+
When you pass `useNewFrontendSystem: true` to [`configure()`](/guide/deployment/rhdh-deployment#configureoptions), `@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 (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**, overridable via `RHDH_E2E_NFS_APP_AUTH_PACKAGE` / `RHDH_E2E_NFS_APP_INTEGRATIONS_PACKAGE` ([guide](/guide/configuration/environment-variables#new-frontend-system-app-next-shell-plugins)).
42+
43+
You can **remove** hand-maintained `app-auth` / `app-integrations` lines from `dynamic-plugins.yaml` when the framework supplies them. Keep workspace-only plugins and metadata-driven config as today.
44+
45+
Optional **`value_file-app-next.yaml`** is merged last when `useNewFrontendSystem` is true and the file exists — use for chart tweaks specific to app-next runs.
46+
3547
## app-config-rhdh.yaml (Optional)
3648

3749
The main RHDH configuration file. This file is merged with default configurations from `@red-hat-developer-hub/e2e-test-utils`.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@red-hat-developer-hub/e2e-test-utils",
3-
"version": "1.1.37",
3+
"version": "1.1.38",
44
"description": "Test utilities for RHDH E2E tests",
55
"license": "Apache-2.0",
66
"repository": {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
includes:
2+
- dynamic-plugins.default.yaml
3+
plugins:
4+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-app-auth:bs_1.49.4__0.0.1
5+
disabled: false
6+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-app-integrations:bs_1.49.4__0.0.1
7+
disabled: false

0 commit comments

Comments
 (0)