Skip to content

[release-1.9] ci(backstage): skip plugin downloads in PR checks and use chart defaults#485

Merged
openshift-merge-bot[bot] merged 1 commit into
redhat-developer:release-1.9from
rm3l:cherry-pick/release-1.9/fix_ci
Jul 22, 2026
Merged

[release-1.9] ci(backstage): skip plugin downloads in PR checks and use chart defaults#485
openshift-merge-bot[bot] merged 1 commit into
redhat-developer:release-1.9from
rm3l:cherry-pick/release-1.9/fix_ci

Conversation

@rm3l

@rm3l rm3l commented Jul 22, 2026

Copy link
Copy Markdown
Member

manual cherry-pick of #482

@sonarqubecloud

Copy link
Copy Markdown

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Context used
✅ Cross-repo context
  Not relevant to this PR: redhat-developer/rhdh
  Not relevant to this PR: redhat-developer/rhdh-plugins
  Not relevant to this PR: redhat-developer/rhdh-must-gather

Grey Divider


Informational

1. Unpinned yq dependency 🐞 Bug ☼ Reliability
Description
.github/workflows/test.yaml and .github/workflows/nightly.yaml invoke yq e ... without
installing/pinning a compatible yq binary, making PR and nightly chart tests depend on whatever (if
any) yq exists on the runner and potentially fail before tests run. This is inconsistent with the
repo’s established pattern of explicitly provisioning yq via the pinned mikefarah/yq action and
can silently reduce nightly coverage even when chart changes are correct.
Code

.github/workflows/test.yaml[R27-31]

+      - name: Generate full-plugins values for template sanity check
+        run: |
+          yq e '{"global": {"dynamic": {"includes": .global.dynamic.includes}}, "orchestrator": {"plugins": .orchestrator.plugins}}' \
+            charts/backstage/values.yaml > /tmp/backstage-full-plugins-values.yaml
+
Relevance

⭐ Low

Same unpinned yq e pattern merged in PR #480; team didn’t require adding/pinning yq despite other
workflows pin it.

PR-#480
PR-#359

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
In test.yaml and nightly.yaml, the jobs run yq e ... but do not include any prior step that
installs or pins yq, so execution relies on runner image tool availability and
version/implementation details. By contrast, bump-version.yaml provisions yq explicitly using the
mikefarah/yq action, demonstrating the repository’s intended approach of treating yq as an
explicit, pinned dependency rather than assuming it is preinstalled.

.github/workflows/test.yaml[21-36]
.github/workflows/bump-version.yaml[96-115]
.github/workflows/nightly.yaml[18-35]

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

## Issue description
Both the PR test workflow and the nightly workflow run `yq e ...` (mikefarah/yq v4 syntax) but do not install or pin yq first. This makes CI fragile because the workflow may fail (or behave differently) depending on whether the runner has yq installed and which implementation/version is present, potentially preventing chart tests from running and silently breaking nightly coverage.

## Issue Context
The repository already demonstrates an established pattern of provisioning yq explicitly via the `mikefarah/yq` GitHub Action in another workflow (`bump-version.yaml`), indicating yq should not be assumed to exist on the runner.

## Fix Focus Areas
- .github/workflows/test.yaml[27-31]
- .github/workflows/nightly.yaml[24-35]
- .github/workflows/bump-version.yaml[96-115]

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


Grey Divider

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

CI(backstage): skip plugin downloads in PR checks and add template sanity render

⚙️ Configuration changes ✨ Enhancement 📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Skip dynamic plugin downloads in Backstage chart CI scenarios to speed up PR checks.
• Add a Helm template-only sanity pass that renders all CI value scenarios with full plugin
 defaults.
• Simplify PR chart testing to rely on chart defaults, and bump chart version/docs accordingly.
Diagram

graph TD
  A["PR workflow"] --> B["test-charts action"] --> C["Helm template check"] --> F["Backstage chart"]
  B --> D["ct install"] --> F
  E["Nightly workflow"] --> B
  G["CI values (includes=[])" ] --> C --> H["Full-plugins override"]
  G --> D
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pass skip-downloads via CI-only --set flags
  • ➕ Avoids repeating global.dynamic.includes: [] in each ci/*-values.yaml file
  • ➕ Keeps CI-specific behavior entirely in the workflow/action layer
  • ➖ Harder to reproduce locally using the checked-in CI scenario files
  • ➖ More implicit: reviewers must chase workflow args to understand why plugins are skipped
2. Introduce a single shared CI overlay values file
  • ➕ Removes duplication across multiple CI scenario values files
  • ➕ Makes the CI-only behavior explicit and centralized
  • ➖ Adds another layer of values merging to reason about for each scenario
  • ➖ Requires updating the action/workflows to always include the overlay file

Recommendation: The current approach is reasonable for a release-branch cherry-pick: it makes the CI behavior explicit in the scenario files while adding a template-only check to still validate "full plugins" rendering without paying the download/install cost in PRs. If duplication across ci/*-values.yaml grows further, consider switching to a shared CI overlay file to centralize the skip-downloads settings.

Files changed (11) +78 / -13

Documentation (1) +2 / -2
README.mdUpdate README version badge and install example to 5.0.4 +2/-2

Update README version badge and install example to 5.0.4

• Synchronizes documentation with the new chart version number.

charts/backstage/README.md

Other (10) +76 / -11
action.ymlExtend test-charts action with helm args + template-only sanity render +32/-2

Extend test-charts action with helm args + template-only sanity render

• Adds inputs for passing raw Helm args to ct install and for providing a values file used in a template-only sanity check. Introduces a looped helm template render across all Backstage CI values scenarios when the Backstage chart changes. Also gates ct --debug on RUNNER_DEBUG and tightens curl protocol usage for OLM install script download.

.github/actions/test-charts/action.yml

nightly.yamlNightly: generate and pass Backstage values override for full plugin defaults +6/-0

Nightly: generate and pass Backstage values override for full plugin defaults

• Generates a minimal values override (dynamic includes + orchestrator plugins) from the chart defaults and passes it to the composite chart test action via helm_extra_args. Keeps nightly testing on the 'next' image while aligning plugin-related settings with chart defaults.

.github/workflows/nightly.yaml

test.yamlPR CI: rely on chart defaults and add template sanity override file +7/-8

PR CI: rely on chart defaults and add template sanity override file

• Adds a job timeout and generates a minimal values file from chart defaults for use in the composite action’s template-only sanity check. Removes prior PR-time image pinning logic so PR checks use the chart’s default image settings for release branches.

.github/workflows/test.yaml

Chart.yamlBump Backstage chart version to 5.0.4 +1/-1

Bump Backstage chart version to 5.0.4

• Increments the Helm chart version to reflect CI/test behavior changes shipped with this release branch.

charts/backstage/Chart.yaml

default-values.yamlDisable dynamic plugin includes in default CI scenario +7/-0

Disable dynamic plugin includes in default CI scenario

• Adds global.dynamic.includes: [] so CI installs do not download dynamic plugins, reducing test time while keeping chart behavior under test intact.

charts/backstage/ci/default-values.yaml

with-custom-dynamic-pvc-claim-spec-values.yamlDisable dynamic plugin includes in custom PVC-claim CI scenario +5/-0

Disable dynamic plugin includes in custom PVC-claim CI scenario

• Sets global.dynamic.includes: [] to skip plugin downloads during CI for this scenario.

charts/backstage/ci/with-custom-dynamic-pvc-claim-spec-values.yaml

with-custom-image-for-test-pod-values.yamlDisable dynamic plugin includes in custom test-pod image CI scenario +6/-0

Disable dynamic plugin includes in custom test-pod image CI scenario

• Sets global.dynamic.includes: [] to skip dynamic plugin downloads for CI runs.

charts/backstage/ci/with-custom-image-for-test-pod-values.yaml

with-orchestrator-and-dynamic-plugins-npmrc-values.yamlSkip plugin downloads and normalize orchestrator plugin list in orchestrator+npmrc scenario +3/-0

Skip plugin downloads and normalize orchestrator plugin list in orchestrator+npmrc scenario

• Overrides global.dynamic.includes to [] to avoid downloads in CI, and sets orchestrator.plugins: [] to ensure orchestrator plugin configuration follows chart defaults unless explicitly overridden.

charts/backstage/ci/with-orchestrator-and-dynamic-plugins-npmrc-values.yaml

with-orchestrator-values.yamlSkip plugin downloads and normalize orchestrator plugin list in orchestrator scenario +3/-0

Skip plugin downloads and normalize orchestrator plugin list in orchestrator scenario

• Overrides global.dynamic.includes to [] to avoid downloads in CI and sets orchestrator.plugins: [] for consistency with other orchestrator CI scenarios.

charts/backstage/ci/with-orchestrator-values.yaml

with-test-pod-disabled-values.yamlDisable dynamic plugin includes in test-pod-disabled CI scenario +6/-0

Disable dynamic plugin includes in test-pod-disabled CI scenario

• Sets global.dynamic.includes: [] to skip dynamic plugin downloads during CI for this scenario.

charts/backstage/ci/with-test-pod-disabled-values.yaml

@rhdh-qodo-merge rhdh-qodo-merge Bot added documentation Improvements or additions to documentation enhancement New feature or request Tests labels Jul 22, 2026
@rm3l rm3l added the lgtm label Jul 22, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit dcacfea into redhat-developer:release-1.9 Jul 22, 2026
6 checks passed
@rm3l
rm3l deleted the cherry-pick/release-1.9/fix_ci branch July 22, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request lgtm Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant