Skip to content

Commit 9d86a52

Browse files
author
HusneShabbir
committed
fix(scorecard-e2e): align dynamic-plugins merge with patched e2e-test-utils
Apply the same e2e-test-utils 1.1.18 Yarn patch and drop the redundant chart dist disable entry from scorecard dynamic-plugins.yaml. Ignore .scratch/ at repo root for local upstream clones. Made-with: Cursor
1 parent 8903d7b commit 9d86a52

5 files changed

Lines changed: 84 additions & 9 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Local tool clones (not part of the overlays build)
2+
.scratch/
3+
14
# Dependencies
25
node_modules/
36
package-lock.json
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
diff --git a/dist/deployment/rhdh/deployment.js b/dist/deployment/rhdh/deployment.js
2+
index 8a491091b27dc0ec80b17e33258d340493553fbc..301ead10b741e8a6ae756d76f40ed3fcf09f3d92 100644
3+
--- a/dist/deployment/rhdh/deployment.js
4+
+++ b/dist/deployment/rhdh/deployment.js
5+
@@ -84,7 +84,12 @@ export class RHDHDeployment {
6+
// Merge with package defaults and auth config. Use normalized plugin key so
7+
// the same logical plugin (e.g. keycloak from metadata OCI + auth local path)
8+
// is deduplicated; metadata (source) wins so OCI URL is kept on PR builds.
9+
- const authPlugins = await mergeYamlFilesIfExists([DEFAULT_CONFIG_PATHS.dynamicPlugins, authConfig.dynamicPlugins], { arrayMergeStrategy: { byKey: "package" } });
10+
+ const authPlugins = await mergeYamlFilesIfExists([DEFAULT_CONFIG_PATHS.dynamicPlugins, authConfig.dynamicPlugins], {
11+
+ arrayMergeStrategy: {
12+
+ byKey: "package",
13+
+ normalizeKey: (item) => getNormalizedPluginMergeKey(item),
14+
+ },
15+
+ });
16+
return deepMerge(authPlugins, metadataConfig, {
17+
arrayMergeStrategy: {
18+
byKey: "package",
19+
@@ -97,7 +102,12 @@ export class RHDHDeployment {
20+
DEFAULT_CONFIG_PATHS.dynamicPlugins,
21+
authConfig.dynamicPlugins,
22+
userConfigPath,
23+
- ], { arrayMergeStrategy: { byKey: "package" } });
24+
+ ], {
25+
+ arrayMergeStrategy: {
26+
+ byKey: "package",
27+
+ normalizeKey: (item) => getNormalizedPluginMergeKey(item),
28+
+ },
29+
+ });
30+
// Inject plugin metadata configuration for plugins in the config
31+
dynamicPluginsConfig =
32+
await loadAndInjectPluginMetadata(dynamicPluginsConfig);

workspaces/scorecard/e2e-tests/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"devDependencies": {
2525
"@eslint/js": "^9.39.2",
2626
"@playwright/test": "1.57.0",
27-
"@red-hat-developer-hub/e2e-test-utils": "1.1.14",
27+
"@red-hat-developer-hub/e2e-test-utils": "1.1.18",
2828
"@types/node": "^24.10.1",
2929
"dotenv": "^16.4.7",
3030
"eslint": "^9.39.2",
@@ -33,5 +33,8 @@
3333
"prettier": "^3.7.4",
3434
"typescript": "^5.9.3",
3535
"typescript-eslint": "^8.50.0"
36+
},
37+
"resolutions": {
38+
"@red-hat-developer-hub/e2e-test-utils@1.1.18": "patch:@red-hat-developer-hub/e2e-test-utils@npm%3A1.1.18#./.yarn/patches/@red-hat-developer-hub-e2e-test-utils-npm-1.1.18-b9e4ec0633.patch"
3639
}
3740
}

workspaces/scorecard/e2e-tests/tests/config/dynamic-plugins.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Enable Scorecard plugin for e2e tests.
2-
# Dynamic Home Page is provided by the RHDH chart default; do not redefine it here to avoid config merge conflicts.
2+
# Dynamic Home Page OCI merges with chart dist in patched e2e-test-utils.
33
plugins:
44
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-scorecard:bs_1.45.3__2.3.5!red-hat-developer-hub-backstage-plugin-scorecard
55
disabled: false
@@ -80,5 +80,3 @@ plugins:
8080
config:
8181
id: "entity-section"
8282
title: "Entity section"
83-
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-dynamic-home-page
84-
disabled: true

workspaces/scorecard/e2e-tests/yarn.lock

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@ __metadata:
1616
languageName: node
1717
linkType: hard
1818

19+
"@backstage-community/plugin-rbac-common@npm:1.23.0":
20+
version: 1.23.0
21+
resolution: "@backstage-community/plugin-rbac-common@npm:1.23.0"
22+
peerDependencies:
23+
"@backstage/errors": ^1.2.7
24+
"@backstage/plugin-permission-common": ^0.9.5
25+
checksum: 8cbb67a4854b9a72d329459cf37d05628da4ca4c665fb1e9c34e2dcbcd8d4399264b00bab8e4ee786717e2c0c5b0e3db7ee4eee6705424047a799fbf311eb5f4
26+
languageName: node
27+
linkType: hard
28+
1929
"@eslint-community/eslint-utils@npm:^4.8.0, @eslint-community/eslint-utils@npm:^4.9.1":
2030
version: 4.9.1
2131
resolution: "@eslint-community/eslint-utils@npm:4.9.1"
@@ -286,11 +296,40 @@ __metadata:
286296
languageName: node
287297
linkType: hard
288298

289-
"@red-hat-developer-hub/e2e-test-utils@npm:1.1.14":
290-
version: 1.1.14
291-
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:1.1.14"
299+
"@red-hat-developer-hub/e2e-test-utils@npm:1.1.18":
300+
version: 1.1.18
301+
resolution: "@red-hat-developer-hub/e2e-test-utils@npm:1.1.18"
302+
dependencies:
303+
"@axe-core/playwright": ^4.11.0
304+
"@backstage-community/plugin-rbac-common": 1.23.0
305+
"@eslint/js": ^9.39.1
306+
"@keycloak/keycloak-admin-client": ^26.0.0
307+
"@kubernetes/client-node": ^1.4.0
308+
eslint: ^9.39.1
309+
eslint-plugin-check-file: ^3.3.1
310+
eslint-plugin-playwright: ^2.4.0
311+
fs-extra: ^11.3.2
312+
js-yaml: ^4.1.1
313+
lodash.clonedeepwith: ^4.5.0
314+
lodash.mergewith: ^4.6.2
315+
otplib: 12.0.1
316+
prettier: ^3.7.4
317+
proper-lockfile: ^4.1.2
318+
typescript: ^5.9.3
319+
typescript-eslint: ^8.48.1
320+
zx: ^8.8.5
321+
peerDependencies:
322+
"@playwright/test": ^1.57.0
323+
checksum: 5d4905c47cba5abec532d6d71806c2e99093563437376964a8cb7e41a87a6862c7701f608adb94d7fb2c5036bbce04841e08e18955bf9fcd5e10b792cee90a44
324+
languageName: node
325+
linkType: hard
326+
327+
"@red-hat-developer-hub/e2e-test-utils@patch:@red-hat-developer-hub/e2e-test-utils@npm%3A1.1.18#./.yarn/patches/@red-hat-developer-hub-e2e-test-utils-npm-1.1.18-b9e4ec0633.patch::locator=scorecard-e2e-tests%40workspace%3A.":
328+
version: 1.1.18
329+
resolution: "@red-hat-developer-hub/e2e-test-utils@patch:@red-hat-developer-hub/e2e-test-utils@npm%3A1.1.18#./.yarn/patches/@red-hat-developer-hub-e2e-test-utils-npm-1.1.18-b9e4ec0633.patch::version=1.1.18&hash=7174a6&locator=scorecard-e2e-tests%40workspace%3A."
292330
dependencies:
293331
"@axe-core/playwright": ^4.11.0
332+
"@backstage-community/plugin-rbac-common": 1.23.0
294333
"@eslint/js": ^9.39.1
295334
"@keycloak/keycloak-admin-client": ^26.0.0
296335
"@kubernetes/client-node": ^1.4.0
@@ -309,7 +348,7 @@ __metadata:
309348
zx: ^8.8.5
310349
peerDependencies:
311350
"@playwright/test": ^1.57.0
312-
checksum: 22264a01c79284deaa18c455b6477b7ea304fca62f2517cf347c1fc51131003d58db383e04bfcc0e8ddbe231d819f9ae0b9ee5497b2b00a2cff56ed70c1a1339
351+
checksum: 2e9d73412938ed334076b852fc0bfdecde4c4cc94830175de584ee27e50bc263d4a941c29302a73666e16a570c4eda45d53e7dc0bb3dd3b4d21627fab1c1c86d
313352
languageName: node
314353
linkType: hard
315354

@@ -2057,7 +2096,7 @@ __metadata:
20572096
dependencies:
20582097
"@eslint/js": ^9.39.2
20592098
"@playwright/test": 1.57.0
2060-
"@red-hat-developer-hub/e2e-test-utils": 1.1.14
2099+
"@red-hat-developer-hub/e2e-test-utils": 1.1.18
20612100
"@types/node": ^24.10.1
20622101
dotenv: ^16.4.7
20632102
eslint: ^9.39.2

0 commit comments

Comments
 (0)