Skip to content

Commit 93d7ff2

Browse files
fix: fetch default.packages.yaml from rhdh-plugin-export-overlays for non-1.10 branches (#110)
* fix: fetch default.packages.yaml from rhdh-plugin-export-overlays for non-1.10 branches The file was moved from the rhdh repo to rhdh-plugin-export-overlays. release-1.10 continues to use the legacy rhdh repo URL; all other branches (main, release-1.11+) now fetch from rhdh-plugin-export-overlays. Assisted-by: Claude Code Co-Authored-By: Claude Code * docs: update default.packages.yaml links to rhdh-plugin-export-overlays The file moved repos; update all docs references to point to the new location so markdown-link-check passes. Assisted-by: Claude Code Co-Authored-By: Claude Code
1 parent b627cb2 commit 93d7ff2

7 files changed

Lines changed: 25 additions & 10 deletions

File tree

docs/changelog.md

Lines changed: 8 additions & 2 deletions
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.44] - Current
5+
## [1.1.45] - Current
6+
7+
### Fixed
8+
9+
- **`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.
10+
11+
## [1.1.44]
612

713
### Changed
814

@@ -48,7 +54,7 @@ All notable changes to this project will be documented in this file.
4854

4955
### Changed
5056

51-
- **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`.
57+
- **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`.
5258
- **`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.
5359
- **`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`.
5460

docs/guide/configuration/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ These are set automatically during deployment:
4242

4343
These control automatic plugin configuration injection from metadata files.
4444

45-
> **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).
45+
> **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).
4646
4747
| Variable | Description | Effect |
4848
| ------------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/guide/utilities/plugin-metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The system operates in three modes based on environment variables:
193193

194194
### DPDY vs Non-DPDY in Nightly
195195

196-
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:
196+
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:
197197

198198
- **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).
199199
- **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.

docs/overlay/reference/environment-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Set `SKIP_KEYCLOAK_DEPLOYMENT=true` when using guest authentication and you don'
8282

8383
These control automatic plugin configuration generation from metadata files.
8484

85-
> **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).
85+
> **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).
8686
8787
| Variable | Description | Effect |
8888
| ------------------------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

docs/overlay/reference/plugin-metadata-resolution.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This page explains how plugin packages are resolved in overlay E2E tests. It is
66

77
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.
88

9-
> **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).
9+
> **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).
1010
1111
## Modes
1212

@@ -121,7 +121,7 @@ Metadata is the source of truth for the package reference, except for plugins in
121121

122122
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).
123123

124-
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`.
124+
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`.
125125

126126
### PR Check Mode (`GIT_PR_NUMBER` set)
127127

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.44",
3+
"version": "1.1.45",
44
"description": "Test utilities for RHDH E2E tests",
55
"license": "Apache-2.0",
66
"repository": {

src/utils/plugin-metadata.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ export function isNightlyJob(): boolean {
7878
// ── Default Packages (DPDY) ──────────────────────────────────────────────────
7979

8080
const DEFAULT_PACKAGES_BASE_URL =
81+
"https://raw.githubusercontent.com/redhat-developer/rhdh-plugin-export-overlays/refs/heads";
82+
83+
// release-1.10 still hosts default.packages.yaml in the rhdh repo (pre-migration)
84+
const LEGACY_DEFAULT_PACKAGES_BASE_URL =
8185
"https://raw.githubusercontent.com/redhat-developer/rhdh/refs/heads";
8286

8387
const DEFAULT_DPDY_OCI_REGISTRY = "registry.access.redhat.com/rhdh";
@@ -96,7 +100,8 @@ interface DefaultPackagesYaml {
96100
* {{inherit}} tag resolution vs which need full OCI refs from metadata.
97101
*
98102
* Branch is determined by RELEASE_BRANCH_NAME (set by OpenShift CI),
99-
* defaulting to "main" for local development.
103+
* defaulting to "main" for local development. For release-1.10 the file
104+
* lives in the rhdh repo; all other branches use rhdh-plugin-export-overlays.
100105
*/
101106
export async function fetchDefaultPackages(): Promise<Set<string>> {
102107
const branch = process.env.RELEASE_BRANCH_NAME;
@@ -111,7 +116,11 @@ export async function fetchDefaultPackages(): Promise<Set<string>> {
111116
);
112117
}
113118
const resolvedBranch = branch || "main";
114-
const url = `${DEFAULT_PACKAGES_BASE_URL}/${resolvedBranch}/default.packages.yaml`;
119+
const baseUrl =
120+
resolvedBranch === "release-1.10"
121+
? LEGACY_DEFAULT_PACKAGES_BASE_URL
122+
: DEFAULT_PACKAGES_BASE_URL;
123+
const url = `${baseUrl}/${resolvedBranch}/default.packages.yaml`;
115124

116125
console.log(
117126
`[PluginMetadata] Fetching default packages from ${url} (branch: ${resolvedBranch})...`,

0 commit comments

Comments
 (0)