diff --git a/docs/changelog.md b/docs/changelog.md index c4ad386..5430936 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,7 +2,13 @@ All notable changes to this project will be documented in this file. -## [1.1.44] - Current +## [1.1.45] - Current + +### Fixed + +- **`default.packages.yaml` fetch URL**: `release-1.10` continues to fetch from the `rhdh` repo; all other branches (including `main`) now fetch from `rhdh-plugin-export-overlays` where the file was moved. + +## [1.1.44] ### Changed @@ -48,7 +54,7 @@ All notable changes to this project will be documented in this file. ### Changed -- **Nightly `{{inherit}}` resolution**: In nightly mode, plugins listed in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml) whose metadata `spec.dynamicArtifact` is an OCI ref now resolve to `{{inherit}}` tags instead of pinned OCI refs. The `{{inherit}}` tag tells RHDH to resolve both the OCI tag (version) and default config from its built-in DPDY (`dynamic-plugins.default.yaml` in the catalog index image), so no config injection is needed from our side. This tests against the exact versions and configuration shipped in the RC. Plugins NOT in `default.packages.yaml` with OCI metadata continue using full metadata refs with config injection (they aren't in RHDH's built-in defaults). The DPDY list is fetched at runtime from the `rhdh` repo using `RELEASE_BRANCH_NAME` (required in CI, defaults to `main` locally). The `{{inherit}}` registry defaults to `registry.access.redhat.com/rhdh` and can be overridden with `NIGHTLY_DPDY_OCI_REGISTRY` (blanket) or `NIGHTLY_DPDY_OCI_REGISTRY_MAP` (per-plugin JSON: `{"registry": ["pkg1", "pkg2"]}`). This decouples the `{{inherit}}` registry from metadata's `spec.dynamicArtifact`, avoiding mismatches when metadata points to `ghcr.io` but the DPDY uses `registry.access.redhat.com`. +- **Nightly `{{inherit}}` resolution**: In nightly mode, plugins listed in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml) whose metadata `spec.dynamicArtifact` is an OCI ref now resolve to `{{inherit}}` tags instead of pinned OCI refs. The `{{inherit}}` tag tells RHDH to resolve both the OCI tag (version) and default config from its built-in DPDY (`dynamic-plugins.default.yaml` in the catalog index image), so no config injection is needed from our side. This tests against the exact versions and configuration shipped in the RC. Plugins NOT in `default.packages.yaml` with OCI metadata continue using full metadata refs with config injection (they aren't in RHDH's built-in defaults). The DPDY list is fetched at runtime from the `rhdh` repo using `RELEASE_BRANCH_NAME` (required in CI, defaults to `main` locally). The `{{inherit}}` registry defaults to `registry.access.redhat.com/rhdh` and can be overridden with `NIGHTLY_DPDY_OCI_REGISTRY` (blanket) or `NIGHTLY_DPDY_OCI_REGISTRY_MAP` (per-plugin JSON: `{"registry": ["pkg1", "pkg2"]}`). This decouples the `{{inherit}}` registry from metadata's `spec.dynamicArtifact`, avoiding mismatches when metadata points to `ghcr.io` but the DPDY uses `registry.access.redhat.com`. - **`RHDH_SKIP_PLUGIN_METADATA_INJECTION` is local-only**: This env var is now ignored in CI (`CI=true`). It was intended for local development opt-out only — in CI, metadata injection should always run to ensure consistent test behavior. - **`RELEASE_BRANCH_NAME` required in CI for nightly**: When running nightly mode in CI, `RELEASE_BRANCH_NAME` must be set (exported by the OpenShift CI step registry). Locally it defaults to `main`. diff --git a/docs/guide/configuration/environment-variables.md b/docs/guide/configuration/environment-variables.md index 10f74f2..ae60024 100644 --- a/docs/guide/configuration/environment-variables.md +++ b/docs/guide/configuration/environment-variables.md @@ -42,7 +42,7 @@ These are set automatically during deployment: These control automatic plugin configuration injection from metadata files. -> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml). +> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml). | Variable | Description | Effect | | ------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/docs/guide/utilities/plugin-metadata.md b/docs/guide/utilities/plugin-metadata.md index 8fadd89..ebd2ad7 100644 --- a/docs/guide/utilities/plugin-metadata.md +++ b/docs/guide/utilities/plugin-metadata.md @@ -193,7 +193,7 @@ The system operates in three modes based on environment variables: ### DPDY vs Non-DPDY in Nightly -DPDY refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml) (both `enabled` and `disabled` sections). In nightly mode: +DPDY refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml) (both `enabled` and `disabled` sections). In nightly mode: - **In `default.packages.yaml` + OCI metadata**: Use `{{inherit}}` tag — RHDH resolves both the OCI tag (version) and default config from its built-in DPDY. This tests the exact versions and configuration shipped in the RC. No config injection from our side. The registry defaults to `registry.access.redhat.com/rhdh` and can be overridden with `NIGHTLY_DPDY_OCI_REGISTRY` (blanket) or `NIGHTLY_DPDY_OCI_REGISTRY_MAP` (per-plugin JSON, takes precedence). - **NOT in `default.packages.yaml` + OCI metadata**: Use full metadata refs from `spec.dynamicArtifact`. Config injection enabled — these plugins aren't in RHDH's built-in defaults, so they need `appConfigExamples` from metadata. diff --git a/docs/overlay/reference/environment-variables.md b/docs/overlay/reference/environment-variables.md index 0a252c1..85c5056 100644 --- a/docs/overlay/reference/environment-variables.md +++ b/docs/overlay/reference/environment-variables.md @@ -82,7 +82,7 @@ Set `SKIP_KEYCLOAK_DEPLOYMENT=true` when using guest authentication and you don' These control automatic plugin configuration generation from metadata files. -> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml). +> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml). | Variable | Description | Effect | | ------------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | diff --git a/docs/overlay/reference/plugin-metadata-resolution.md b/docs/overlay/reference/plugin-metadata-resolution.md index cbb1d91..e93571e 100644 --- a/docs/overlay/reference/plugin-metadata-resolution.md +++ b/docs/overlay/reference/plugin-metadata-resolution.md @@ -6,7 +6,7 @@ This page explains how plugin packages are resolved in overlay E2E tests. It is The test framework resolves plugin package references before deploying RHDH. This page explains how the resolution works in each mode, what metadata controls, and the common scenarios you'll encounter. -> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml). +> **DPDY** refers to `dynamic-plugins.default.yaml` in the catalog index image shipped with RHDH. The list of DPDY packages is defined in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml). ## Modes @@ -121,7 +121,7 @@ Metadata is the source of truth for the package reference, except for plugins in The tables below show what happens to each plugin type in PR check and nightly modes. Local dev behaves the same as PR check (metadata refs + full config injection). -In nightly mode, resolution depends on whether the plugin's npm package name is listed in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh/blob/main/default.packages.yaml) (both `enabled` and `disabled` sections) AND whether its metadata `spec.dynamicArtifact` is an OCI ref. The list is fetched at runtime from the `rhdh` repo using `RELEASE_BRANCH_NAME`. +In nightly mode, resolution depends on whether the plugin's npm package name is listed in [`default.packages.yaml`](https://github.com/redhat-developer/rhdh-plugin-export-overlays/blob/main/default.packages.yaml) (both `enabled` and `disabled` sections) AND whether its metadata `spec.dynamicArtifact` is an OCI ref. The list is fetched at runtime from the `rhdh` repo using `RELEASE_BRANCH_NAME`. ### PR Check Mode (`GIT_PR_NUMBER` set) diff --git a/package.json b/package.json index e021198..a71e710 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@red-hat-developer-hub/e2e-test-utils", - "version": "1.1.44", + "version": "1.1.45", "description": "Test utilities for RHDH E2E tests", "license": "Apache-2.0", "repository": { diff --git a/src/utils/plugin-metadata.ts b/src/utils/plugin-metadata.ts index 20bcfe7..4dc6828 100644 --- a/src/utils/plugin-metadata.ts +++ b/src/utils/plugin-metadata.ts @@ -78,6 +78,10 @@ export function isNightlyJob(): boolean { // ── Default Packages (DPDY) ────────────────────────────────────────────────── const DEFAULT_PACKAGES_BASE_URL = + "https://raw.githubusercontent.com/redhat-developer/rhdh-plugin-export-overlays/refs/heads"; + +// release-1.10 still hosts default.packages.yaml in the rhdh repo (pre-migration) +const LEGACY_DEFAULT_PACKAGES_BASE_URL = "https://raw.githubusercontent.com/redhat-developer/rhdh/refs/heads"; const DEFAULT_DPDY_OCI_REGISTRY = "registry.access.redhat.com/rhdh"; @@ -96,7 +100,8 @@ interface DefaultPackagesYaml { * {{inherit}} tag resolution vs which need full OCI refs from metadata. * * Branch is determined by RELEASE_BRANCH_NAME (set by OpenShift CI), - * defaulting to "main" for local development. + * defaulting to "main" for local development. For release-1.10 the file + * lives in the rhdh repo; all other branches use rhdh-plugin-export-overlays. */ export async function fetchDefaultPackages(): Promise> { const branch = process.env.RELEASE_BRANCH_NAME; @@ -111,7 +116,11 @@ export async function fetchDefaultPackages(): Promise> { ); } const resolvedBranch = branch || "main"; - const url = `${DEFAULT_PACKAGES_BASE_URL}/${resolvedBranch}/default.packages.yaml`; + const baseUrl = + resolvedBranch === "release-1.10" + ? LEGACY_DEFAULT_PACKAGES_BASE_URL + : DEFAULT_PACKAGES_BASE_URL; + const url = `${baseUrl}/${resolvedBranch}/default.packages.yaml`; console.log( `[PluginMetadata] Fetching default packages from ${url} (branch: ${resolvedBranch})...`,