Skip to content

fix(rhdh): replace bundled plugin defaults with user overrides - #820

Closed
Fortune-Ndlovu wants to merge 1 commit into
redhat-developer:mainfrom
Fortune-Ndlovu:fix/rhdhbugs-3928-dedupe-bundled-plugin-defaults
Closed

Fortune-Ndlovu wants to merge 1 commit into
redhat-developer:mainfrom
Fortune-Ndlovu:fix/rhdhbugs-3928-dedupe-bundled-plugin-defaults

Conversation

@Fortune-Ndlovu

@Fortune-Ndlovu Fortune-Ndlovu commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Description of the change

With intelligentAssistant.enabled, the chart appends the bundled ref:// plugin defaults to dynamicPlugins.plugins. A user entry naming the same plugin, as ref://name or oci://...:{{inherit}}, therefore produced a second entry for one plugin. install-dynamic-plugins rejects two entries for the same OCI plugin at the same level with Duplicate OCI plugin configuration, so RHDH did not start.

This keys the merge on the catalog plugin name, mirroring the operator merge key, and appends a bundled default only when the user has not already named that plugin. The user's package form is kept, so an oci:// override still asks for the registry or version the user wrote. The same dedupe applies to the orchestrator defaults.

The chart version is bumped to 3.5.21.

Pre-commit note

pre-commit run --all-files with helm-docs v1.15.0 (released 2026-12-01) rewrites the maintainer table header from Url to URL in every chart README. This PR keeps that regeneration out of the diff, because touching the other charts' READMEs makes chart-testing demand version bumps for charts this change does not touch. The Pre-commit job may therefore report those unrelated READMEs until a repo-wide regeneration (or a pinned helm-docs version in the workflow) lands. The charts/rhdh README here was generated with the same helm-docs version.

Known limitation

The chart renders the plugin list through tpl, so values that use {{inherit}} must still be written as {{ "{{inherit}}" }} — the pattern already used in charts/backstage/values.yaml. This change does not alter that; it makes the escaped form collapse to one entry.

Which issue(s) does this PR fix or relate to

  • Relates to RHDHBUGS-3928 (staging Jira instance used for triage; the same defect on the operator path)

How to test changes / Special notes to the reviewer

helm dependency build charts/rhdh
./hack/assert-rendered-values.sh

hack/assert-rendered-values.sh now checks that a ref:// default and an oci://...:{{inherit}} override for the same plugin render as one entry, that untouched defaults are kept, and that the user's package form survives. On unmodified main the new assertions fail with the two duplicate names; with this change all 20 assertions pass.

Manual check:

cat > /tmp/plugins.yaml <<'EOF'
dynamicPlugins:
  includes: []
  plugins:
    - package: 'oci://quay.io/rhdh/red-hat-developer-hub-backstage-plugin-intelligent-assistant:{{ "{{inherit}}" }}'
      enabled: true
intelligentAssistant:
  plugins:
    - package: 'ref://red-hat-developer-hub-backstage-plugin-intelligent-assistant'
      enabled: true
    - package: 'ref://red-hat-developer-hub-backstage-plugin-intelligent-assistant-backend'
      enabled: true
orchestrator:
  plugins: []
EOF

helm template test-release charts/rhdh --values /tmp/plugins.yaml \
  | yq -N 'select(.kind == "ConfigMap" and (.metadata.name | test("-dynamic-plugins$"))) | .data["dynamic-plugins.yaml"]'

Before this change the output has three entries, including both ref://red-hat-developer-hub-backstage-plugin-intelligent-assistant and the oci:// override. After, there are two: the user's oci:// entry and the untouched backend default.

Verification log
$ ./hack/assert-rendered-values.sh
...
==> dynamic plugins: user catalog references replace bundled defaults
  ok: user overrides: no plugin appears twice
  ok: user overrides: 4 entries (2 user + 2 untouched defaults)
  ok: user overrides: oci:// form is preserved

All 20 rendered-values assertions passed

With the template change reverted, the same run fails:

  FAIL: user overrides: no plugin appears twice: expected '', got 'red-hat-developer-hub-backstage-plugin-intelligent-assistant
red-hat-developer-hub-backstage-plugin-orchestrator'
  FAIL: user overrides: 4 entries (2 user + 2 untouched defaults): expected '4', got '6'

2 of 20 rendered-values assertions failed

helm lint charts/rhdh and helm template across all charts/rhdh/ci/*-values.yaml pass.

Checklist

  • For each Chart updated, version bumped in the corresponding Chart.yaml according to Semantic Versioning.
  • For each Chart updated, variables are documented in the values.yaml and added to the corresponding README.md. The helm-docs hook was run for charts/rhdh.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook — no values were added, so the schema is unchanged.
  • Tests pass using Chart Testing tooling: helm lint and hack/assert-rendered-values.sh pass locally. ct install was not run (no cluster in this environment).
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned — not applicable, that chart is unchanged.

Assisted by: rhdh-agentic-bug-triager (AI). A human should review before merge.

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.93%. Comparing base (6101243) to head (ab9d331).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #820   +/-   ##
=======================================
  Coverage   75.93%   75.93%           
=======================================
  Files          22       22           
  Lines        1467     1467           
  Branches      117      117           
=======================================
  Hits         1114     1114           
  Misses        353      353           
Flag Coverage Δ
rhdh 66.73% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Fortune-Ndlovu
Fortune-Ndlovu force-pushed the fix/rhdhbugs-3928-dedupe-bundled-plugin-defaults branch from 67b0824 to 92d0d9c Compare December 1, 2026 14:41
With intelligentAssistant.enabled, the chart appends the bundled ref://
defaults to the user's dynamicPlugins.plugins list. A user override for the
same plugin, written as ref:// or oci://...:{{inherit}}, therefore reached
install-dynamic-plugins as a second entry. The installer rejects two entries
for one OCI plugin at the same level, so RHDH did not start.

Key the merge on the catalog plugin name, mirroring the operator merge key,
and skip a bundled default when the user already named that plugin. The
user's package form is kept. This covers both the Intelligent Assistant and
the orchestrator defaults.

Relates to RHDHBUGS-3928.

Co-authored-by: Armel Soro <asoro@redhat.com>
@Fortune-Ndlovu
Fortune-Ndlovu force-pushed the fix/rhdhbugs-3928-dedupe-bundled-plugin-defaults branch from 92d0d9c to ab9d331 Compare December 1, 2026 16:25
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant