ci: validate loaded plugins after RHDH startup#262
Conversation
The CI smoke tests only checked for HTTP 200 from the homepage, which meant configuration changes (like switching from `disabled: false` to `enabled: true`) could silently break plugin loading without CI catching it. Add a validation script that authenticates via guest auth, queries /api/extensions/loaded-plugins, and compares the response against the dynamic-plugins YAML config — verifying both that enabled plugins are loaded and disabled plugins are not. Plugin names are normalized to handle differences between OCI image names and npm scoped package names. Ref: RHDHBUGS-3440 Assisted-by: Claude
99e36d9 to
173b26d
Compare
Per the orchestrator README, orchestrator plugins must be added to a dynamic-plugins.override.yaml to be loaded by RHDH. Without this, the orchestrator compose config started the SonataFlow container but never actually loaded the orchestrator plugins in RHDH. If an override already exists (e.g., from the user config step), the orchestrator plugins are appended. Otherwise, the default config is copied as the base before appending. Assisted-by: Claude
SonarCloud flagged all single-bracket test expressions. The `[[` construct is safer (no word splitting or globbing) and more feature-rich. Assisted-by: Claude
…moke-tests-do-not-validate-which-dynamic-plugins-are-actually-loaded
The script was silently exiting 0 when it could not authenticate or reach the API, which defeats the purpose of the validation step. Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
PR Summary by QodoCI: validate configured dynamic plugins are loaded after RHDH startup
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used 1.
|
The script was silently skipping validation when yq was missing or failed to parse configs, because stderr was redirected to /dev/null and exit status was unchecked. Assisted-by: Claude
Replaces hard-coded /tmp/loaded-plugins.json with mktemp, cleaned up on exit to avoid stale files across repeated local runs. Assisted-by: Claude
Assisted-by: Claude
|



Description
The CI smoke tests only checked for HTTP 200 from the homepage, which meant some configuration changes could silently break plugin loading without CI catching it.
This checks the plugins that are loaded once RHDH is started and compares against the expected configuration.
Which issue(s) does this PR fix or relate to
PR acceptance criteria
How to test changes / Special notes to the reviewer
The checks on this PR are passing with the changes here, e.g.: https://github.com/redhat-developer/rhdh-local/actions/runs/28782801578/job/85342325860?pr=262#step:3:2001
To verify locally:
docker compose up -d./tests/validate-loaded-plugins.sh[PASS]global-floating-action-buttonplugin should also show[PASS](confirmed not loaded)For orchestrator config, pass the extra config:
./tests/validate-loaded-plugins.sh orchestrator/configs/dynamic-plugins/dynamic-plugins.yamlAssisted-by: Claude