feat(e2e): cluster-free plugin sanity check for the catalog index (RHIDP-13508)#4967
feat(e2e): cluster-free plugin sanity check for the catalog index (RHIDP-13508)#4967gustavolira wants to merge 3 commits into
Conversation
PR Summary by Qodofeat(e2e): add Playwright plugin sanity-check test Description
Diagram
High-Level Assessment
Files changed (3)
|
|
The container image build workflow finished with status: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4967 +/- ##
==========================================
- Coverage 55.39% 54.77% -0.62%
==========================================
Files 122 110 -12
Lines 2365 2147 -218
Branches 563 538 -25
==========================================
- Hits 1310 1176 -134
+ Misses 1048 969 -79
+ Partials 7 2 -5
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Code Review by Qodo
Context used 1.
|
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
Implements review findings from PR redhat-developer#4967 code review: **Correctness fixes:** - Fix test.beforeAll signature to use test.info() (follows smoke-test.spec.ts pattern) - Remove unused manifestPath variable in plugin-dynamic-loading.spec.ts **Code organization:** - Extract DEFAULT_PACKAGES_PATH constant to avoid duplication - Move CONFIG_OVERRIDES to module scope for better reusability - Remove unused catalog-index-parser.ts (can be recreated when needed) **Type safety:** - Import and use BackendFeature type for require() calls instead of any - Improves type safety when loading plugin modules **Developer experience:** - Improve console.warn message to explain impact of missing _nodeModulePaths All changes are low-risk refactorings that improve code quality without changing behavior. Type checking passes with no errors. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
The container image build workflow finished with status: |
|
/test ? |
|
/test e2e-ocp-helm-nightly |
1 similar comment
|
/test e2e-ocp-helm-nightly |
|
/test e2e-ocp-helm-nightly |
Implements review findings from PR redhat-developer#4967 code review: **Correctness fixes:** - Fix test.beforeAll signature to use test.info() (follows smoke-test.spec.ts pattern) - Remove unused manifestPath variable in plugin-dynamic-loading.spec.ts **Code organization:** - Extract DEFAULT_PACKAGES_PATH constant to avoid duplication - Move CONFIG_OVERRIDES to module scope for better reusability - Remove unused catalog-index-parser.ts (can be recreated when needed) **Type safety:** - Import and use BackendFeature type for require() calls instead of any - Improves type safety when loading plugin modules **Developer experience:** - Improve console.warn message to explain impact of missing _nodeModulePaths All changes are low-risk refactorings that improve code quality without changing behavior. Type checking passes with no errors. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
/test e2e-ocp-helm-nightly |
…tion, path prefixes - Mark harnesses that are still in review and instruct the assistant to verify paths exist on main before recommending them (the skill referenced redhat-developer#5005/redhat-developer#5044/redhat-developer#2714/redhat-developer#4967 deliverables in present tense). - Describe the overlays native smoke's real interface: yarn smoke --dynamic-plugins <file> [--out] (no --workspace flag exists; the harness does not read workspaces/*/metadata — a workspace run is a dp.yaml listing its oci:// refs). - Replace the fork-only RHIDP-13235-layer3-component-tests branch pointer with the closed PR rhdh#4864. - Prefix every path with its repo (rhdh:/overlays:/plugins:) and use full URLs for cross-repo docs, so the skill resolves from any of its three homes. - Fix skopeo claim: it installs on macOS via brew; CI has it preinstalled. - Name the Docker smoke location (overlays smoke-tests/ + run-workspace-smoke-tests.yaml), replace the vague "any" repo cell, use "n/a (cluster)" for the cluster row's Docker column, move PR numbers to References with status, add trigger phrases to the frontmatter description, and deduplicate the guiding-rule sentence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…DME link - Fix the Tally L3 count (10, not 9) so the column totals sum to the 30-spec heading; reconcile the heading itself (29 on main + redhat-developer#19 pending in PR redhat-developer#4967). - "runs 4 tests" -> "runs 2 specs (4 test cases)" — the doc's accounting unit is the spec; note that spec numbers refer to the matrix below. - Soften "fully covers the 12 pure-backend workspaces" to load + API surface: scaffolder-backend-module-kubernetes also has a UI e2e that needs the render harness, so "fully" overstated the native-smoke scope. - Replace short commit hashes and the fork-only RHIDP-13235-layer3-component-tests branch name with the durable PR reference (rhdh#4864, closed) — hashes on a mutable branch dangle after a rebase or branch deletion. - Give DRAFT a promotion condition (groomed into RHIDP-13528/13529). - Link the matrix from docs/e2e-tests/README.md ("Adding a Test") so the doc is discoverable outside the Jira comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
/test e2e-ocp-helm-nightly |
|
/test e2e-ocp-helm-nightly |
… wording - 2026-07-07 update: 10 specs (not 9) — the list itself names ten files. - Drop the positional "queue above" reference (the queue list no longer precedes it) and past-tense the 2026-07-02 "now runs" so the two dated updates stop contradicting each other. - Self-date the PR redhat-developer#4967 "open" claim and add PR redhat-developer#5057 to References. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…DME link - Fix the Tally L3 count (10, not 9) so the column totals sum to the 30-spec heading; reconcile the heading itself (29 on main + redhat-developer#19 pending in PR redhat-developer#4967). - "runs 4 tests" -> "runs 2 specs (4 test cases)" — the doc's accounting unit is the spec; note that spec numbers refer to the matrix below. - Soften "fully covers the 12 pure-backend workspaces" to load + API surface: scaffolder-backend-module-kubernetes also has a UI e2e that needs the render harness, so "fully" overstated the native-smoke scope. - Replace short commit hashes and the fork-only RHIDP-13235-layer3-component-tests branch name with the durable PR reference (rhdh#4864, closed) — hashes on a mutable branch dangle after a rebase or branch deletion. - Give DRAFT a promotion condition (groomed into RHIDP-13528/13529). - Link the matrix from docs/e2e-tests/README.md ("Adding a Test") so the doc is discoverable outside the Jira comment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… wording - 2026-07-07 update: 10 specs (not 9) — the list itself names ten files. - Drop the positional "queue above" reference (the queue list no longer precedes it) and past-tense the 2026-07-02 "now runs" so the two dated updates stop contradicting each other. - Self-date the PR redhat-developer#4967 "open" claim and add PR redhat-developer#5057 to References. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
/test e2e-ocp-helm-nightly |
|
@gustavolira: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
…IDP-13508) Validates that every plugin enabled by the catalog index loads in the real RHDH backend, without a cluster deployment or product image. Builds on the cluster-free local E2E harness (redhat-developer#5005): Playwright boots packages/backend from source - the product's own Backstage line and dynamicPluginsFeatureLoader - and the spec compares the installed plugin set against /api/dynamic-plugins-info/loaded-plugins. Runs in the nightly OCP job alongside the existing cluster-based sanity-plugins deployment: the cluster deployment validates the curated plugin set on the shipped image; this validates the FULL index composition against the current backend line. - populate-catalog-index.sh: extracts dynamic-plugins.default.yaml from CATALOG_INDEX_IMAGE (skopeo dir: layout, layers via manifest.json) and generates an install config re-enabling every oci:// package the index declares (the index ships them disabled by default), then installs via the shared populate.sh (now accepting a config argument) - playwright.plugin-sanity.config.ts: backend-only webServer boot; shared harness pieces extracted to playwright/support/local-harness-servers.ts (also used by playwright.legacy-local.config.ts) plus app-config.plugin-sanity.yaml (dummy values for plugins that abort the backend on missing config, e.g. the roadie argocd instance URL) - plugin-dynamic-loading.spec.ts: request-only spec (guest token -> loaded-plugins) failing with the list of installed-but-not-loaded plugins; static frontend bundle validation on top - plugin-sanity-excludes.txt: documented known failures skipped at install time (orchestrator backend + loki module cannot initialize in a standalone boot and would abort the backend); extended-regex patterns anchored with (@|:) so entries survive the index flipping between digest- and tag-style references - testing::run_plugin_sanity_check: CI wrapper following the testing::run_tests conventions (test_run_tracker, save_overall_result, junit gzip to SHARED_DIR, artifacts), called from handle_ocp_nightly after the cluster-based sanity check; index overridable via Gangway --catalog-index-image for RC verification - declares the yaml dependency already imported by playwright/utils/authentication-providers (phantom dependency fix) Verified locally against quay.io/rhdh/plugin-catalog-index:next: 13 plugins installed (8 backend, 5 frontend), backend booted, 13/13 reported loaded - 1 passed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The cluster-based sanity-plugins deployment hard-coded its plugin list in diff-values_showcase-sanity-plugins.yaml with pinned tags - a frozen snapshot of the index that rots on every index rebuild. Derive the enabled set dynamically from the same CATALOG_INDEX_IMAGE the cluster-free check uses, so both flavors track the index (and an RC index passed via Gangway --catalog-index-image drives both): - catalog-index-refs.sh: shared parser (extracted from populate-catalog-index.sh) listing every package the index declares - oci:// refs AND ./dynamic-plugins/dist paths (the latter live inside the product image, so enabling them exercises the image content) - with plugin-sanity-excludes.txt applied - generate-catalog-enable-values.sh: emits a Helm values fragment enabling every declared package; packages whose NAME already has a curated entry are omitted - exact-ref dedup is not enough, since curated entries pin old tags and the same plugin under a newer index ref would be enabled twice (duplicate pluginId -> backend crash) - initiate_sanity_plugin_checks_deployment: merges the generated fragment UNDER the curated values (helm::merge_values merge - diff precedence keeps curated pluginConfig), falling back to the curated list when generation fails; fragment and final values saved as artifacts - run_sanity_plugins_check: exports CATALOG_INDEX_IMAGE (+ derived CATALOG_INDEX_* chart components) BEFORE the Helm install so helm::get_image_params passes the index to the chart - testing::report_plugin_startup_failures: scans pod logs (current and previous containers - CrashLoopBackOff keeps the culprit in -p) for 'threw an error during startup' / 'Backend startup failed' and prints a loud PLUGIN STARTUP FAILURES summary, saved as an artifact; the cluster-free wrapper greps its own run log for the same signatures on failure - a broken plugin takes the whole pod down by design, so the report names the culprit without log digging Verified locally: generated fragment from :next (43 dynamic packages, argocd/gitlab curated entries deduped by name), helm::merge_values produces 78 deduplicated plugins with curated pluginConfig intact; cluster-free flavor revalidated end-to-end after the shared-parser refactor (13/13 loaded, 1 passed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Addresses the SonarCloud bash best-practices findings on the local-harness scripts: single-bracket [ ] tests replaced with the safer [[ ]] construct (and the two chained [ ] && [ ] tests in populate.sh collapsed into one [[ ... && ... ]]). Behavior-neutral - shellcheck, bash -n and a generator run against the live index confirm identical output. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The container image build workflow finished with status: |
|
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |



Summary
Plugin sanity checking for the RHDH catalog index, implementing RHIDP-13508. Two complementary flavors, both running in the nightly OCP job and both driven by the same
CATALOG_INDEX_IMAGE(branch-matched nightly index by default; RC index via Gangway--catalog-index-image):packages/backendfrom source (the product's own Backstage line anddynamicPluginsFeatureLoader) and the spec compares the installed set against/api/dynamic-plugins-info/loaded-plugins, failing with the exact list of installed-but-not-loaded plugins../dynamic-plugins/dist/*plugins that live inside the product image — enabling them exercises the image content). The shipped RHDH image remains the artifact under test here.How the dynamic set works (shared between flavors)
local-harness/catalog-index-refs.sh— shared parser: extractsdynamic-plugins.default.yamlfrom the index image and lists every declared package (uncommented entries only), applyingplugin-sanity-excludes.txt(documented known failures, shared by both flavors)populate-catalog-index.shwraps the refs into an install config (the index ships packagesdisabled: true, so a plainincludeswould install nothing) and installs via the sharedpopulate.shgenerate-catalog-enable-values.shwraps the refs into a Helm values fragment merged UNDER the curated values (helm::merge_values merge— curated entries win, keeping their env-specificpluginConfig). Packages whose name already has a curated entry are omitted from the fragment: curated entries pin old tags, so exact-ref dedup would enable the same plugin twice (duplicate pluginId → backend crash). Falls back to the curated list if generation fails.Failure reporting — which plugin broke?
A broken plugin takes the whole backend down by design. To make the culprit obvious:
testing::report_plugin_startup_failuresscans the RHDH pod logs (current + previous containers, so CrashLoopBackOff is covered) forthrew an error during startup/Backend startup failedand prints a loudPLUGIN STARTUP FAILURESblock, saved as a build artifactCI integration
Both flavors run in
handle_ocp_nightly→run_sanity_plugins_check, which exportsCATALOG_INDEX_IMAGE(+ derived chart components) before the Helm install so the chart, the in-container install CLI and the cluster-free check all consume the same index. The cluster-free wrapper (testing::run_plugin_sanity_check) follows thetesting::run_testsconventions (test_run_tracker,save_overall_result, gzipped JUnit toSHARED_DIR, report artifacts) so Slack reporting includes it like any other run.RC verification:
--tag <rc-image-tag> --catalog-index-image quay.io/rhdh/plugin-catalog-index:<rc-index-tag>via Gangway tests the RC image on the cluster AND the RC index composition cluster-free, in one job.Local runs
Verification
:next: 13 plugins installed (8 backend, 5 frontend), backend booted, 13/13 loaded —1 passed. Surfaced three real composition issues along the way (orchestrator backend init failure, loki module, argocd startup config) — the class of problem the check exists to catch.:next+ the current curated file: 43 dynamically enabled packages, argocd/gitlab curated entries correctly deduped by name,helm::merge_valuesoutput = 78 deduplicated plugins with curatedpluginConfigintact.oxlint,oxfmt,shellcheck,.ciprettier clean. First nightly run will calibrate the excludes list for the in-cluster environment (accepted trade-off of leaving the frozen curated list behind).Also declares the
yamldependency already imported byplaywright/utils/authentication-providers(phantom-dependency fix).Jira