Skip to content

chore(lightspeed): use lightspeed inherit for pluginConfig#399

Open
Jdubrick wants to merge 2 commits into
redhat-developer:mainfrom
Jdubrick:use-lightspeed-inherit
Open

chore(lightspeed): use lightspeed inherit for pluginConfig#399
Jdubrick wants to merge 2 commits into
redhat-developer:mainfrom
Jdubrick:use-lightspeed-inherit

Conversation

@Jdubrick
Copy link
Copy Markdown

Description of the change

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

N/A

How to test changes / Special notes to the reviewer

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 pre-commit utility can be used to generate the necessary content. Run pre-commit run --all-files to run the hooks and then push any resulting changes. The pre-commit Workflow will enforce this and warn you if needed.
  • JSON Schema template updated and re-generated the raw schema via the pre-commit hook.
  • Tests pass using the Chart Testing tool and the ct lint command.
  • If you updated the orchestrator-infra chart, make sure the versions of the Knative CRDs are aligned with the versions of the CRDs installed by the OpenShift Serverless operators declared in the values.yaml file. See Installing Knative Eventing and Knative Serving CRDs for more details.

Jdubrick added 2 commits May 15, 2026 12:36
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@Jdubrick Jdubrick requested a review from a team as a code owner May 15, 2026 16:40
@rhdh-qodo-merge
Copy link
Copy Markdown

rhdh-qodo-merge Bot commented May 15, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0)

Grey Divider


Action required

1. Invalid schema JSON array 🐞 Bug ≡ Correctness
Description
charts/backstage/values.schema.json contains a plugins array with two objects but no comma between
them, which makes the file invalid JSON. Helm/value-schema tooling that parses this file can fail,
breaking installs or CI lint/validation.
Code

charts/backstage/values.schema.json[R222-228]

                        "plugins": [
                            {
                                "disabled": false,
-                                "package": "oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed:{{ \"{{inherit}}\" }}",
-                                "pluginConfig": {
-                                    "dynamicPlugins": {
-                                        "frontend": {
-                                            "red-hat-developer-hub.backstage-plugin-lightspeed": {
-                                                "dynamicRoutes": [
-                                                    {
-                                                        "importName": "LightspeedPage",
-                                                        "path": "/lightspeed"
-                                                    }
-                                                ],
-                                                "mountPoints": [
-                                                    {
-                                                        "importName": "LightspeedFAB",
-                                                        "mountPoint": "application/listener"
-                                                    },
-                                                    {
-                                                        "importName": "LightspeedDrawerProvider",
-                                                        "mountPoint": "application/provider"
-                                                    },
-                                                    {
-                                                        "config": {
-                                                            "id": "lightspeed"
-                                                        },
-                                                        "importName": "LightspeedDrawerStateExposer",
-                                                        "mountPoint": "application/internal/drawer-state"
-                                                    },
-                                                    {
-                                                        "config": {
-                                                            "id": "lightspeed",
-                                                            "priority": 100
-                                                        },
-                                                        "importName": "LightspeedChatContainer",
-                                                        "mountPoint": "application/internal/drawer-content"
-                                                    }
-                                                ],
-                                                "translationResources": [
-                                                    {
-                                                        "importName": "lightspeedTranslations",
-                                                        "module": "Alpha",
-                                                        "ref": "lightspeedTranslationRef"
-                                                    }
-                                                ]
-                                            }
-                                        }
-                                    }
-                                }
+                                "package": "oci://registry.access.redhat.com/rhdh/red-hat-developer-hub-backstage-plugin-lightspeed:{{ \"{{inherit}}\" }}"
                            },
                            {
                                "disabled": false,
Relevance

⭐⭐⭐ High

Team has accepted fixes for broken config syntax/formatting that can break tooling (e.g., stray
char/indent fixes).

PR-#289
PR-#382

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
In both Lightspeed plugin default arrays, the first object closes with } and is immediately
followed by the next object without a , separator, which is invalid JSON syntax for arrays. Other
arrays of objects in the same schema file do use }, separators, confirming the schema is intended
to be strict JSON.

charts/backstage/values.schema.json[222-231]
charts/backstage/values.schema.json[291-301]
charts/backstage/values.schema.json[2993-3004]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`charts/backstage/values.schema.json` is invalid JSON in the Lightspeed plugin defaults because two adjacent objects in an array are not separated by a comma.

## Issue Context
This occurs in two places for `global.lightspeed.plugins`: the top-level example/default block and the `properties.plugins.default` block.

## Fix Focus Areas
- charts/backstage/values.schema.json[222-231]
- charts/backstage/values.schema.json[291-301]

## Expected fix
Add a trailing comma after the first object in each of those arrays (i.e., change the closing `}` of the first object to `},`), or re-generate the schema via the project’s schema generation hook to ensure valid JSON output.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@Jdubrick
Copy link
Copy Markdown
Author

/cc @rm3l

@openshift-ci openshift-ci Bot requested a review from rm3l May 15, 2026 16:40
@sonarqubecloud
Copy link
Copy Markdown

@rhdh-qodo-merge
Copy link
Copy Markdown

Review Summary by Qodo

Remove hardcoded Lightspeed pluginConfig and use inherit

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Remove hardcoded pluginConfig from Lightspeed frontend plugin
• Use inherit mechanism for dynamic plugin configuration
• Bump chart version to 5.13.2
• Simplify plugin configuration by delegating to package defaults
Diagram
flowchart LR
  A["Lightspeed Plugin Config"] -->|Remove hardcoded| B["pluginConfig section"]
  A -->|Use inherit mechanism| C["Package defaults"]
  D["Chart Version"] -->|Bump| E["5.13.1 to 5.13.2"]
  B -->|Simplify| C
Loading

Grey Divider

File Changes

1. charts/backstage/Chart.yaml ⚙️ Configuration changes +1/-1

Update chart version to 5.13.2

• Bump chart version from 5.13.1 to 5.13.2

charts/backstage/Chart.yaml


2. charts/backstage/README.md 📝 Documentation +3/-3

Update documentation version references

• Update version badge from 5.13.1 to 5.13.2
• Update helm install command example with new version

charts/backstage/README.md


3. charts/backstage/values.yaml ✨ Enhancement +1/-25

Remove hardcoded Lightspeed plugin configuration

• Remove entire pluginConfig section from Lightspeed frontend plugin
• Remove nested dynamicPlugins, frontend, and red-hat-developer-hub.backstage-plugin-lightspeed
 configuration
• Simplify first plugin entry to only contain package and disabled fields
• Rely on package defaults via inherit mechanism for plugin configuration

charts/backstage/values.yaml


View more (1)
4. charts/backstage/values.schema.json ✨ Enhancement +2/-94

Simplify JSON schema for Lightspeed plugins

• Remove pluginConfig object from first Lightspeed plugin schema definition
• Remove all nested dynamicPlugins, frontend, and route/mount point configurations
• Simplify plugin schema to only include package and disabled properties
• Update schema in both examples and default values sections

charts/backstage/values.schema.json


Grey Divider

Qodo Logo

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request Bug fix labels May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug fix documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant