Skip to content

chore: Add version to the helm install command mentioned in the charts READMEs [RHDHBUGS-2037]#239

Merged
rm3l merged 13 commits intoredhat-developer:mainfrom
rm3l:add_version_to_charts_READMEs
Sep 16, 2025
Merged

chore: Add version to the helm install command mentioned in the charts READMEs [RHDHBUGS-2037]#239
rm3l merged 13 commits intoredhat-developer:mainfrom
rm3l:add_version_to_charts_READMEs

Conversation

@rm3l
Copy link
Copy Markdown
Member

@rm3l rm3l commented Sep 10, 2025

Description of the change

This is to make sure that users install the expected version of the chart, especially when reading the README from the release branches. Otherwise, they would always be installing the latest version of the charts, which may not be desirable in all cases.

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

https://issues.redhat.com/browse/RHDHBUGS-2037

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. Use pre-commit run -a to apply changes. The pre-commit Workflow will do this automatically for 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.

Summary by Sourcery

Pin helm install commands to specific chart versions by adding explicit --version flags in README files and bump Chart.yaml versions across all charts

Enhancements:

  • Add explicit --version flag to helm install commands in chart READMEs to pin the chart version
  • Bump backstage chart to version 4.5.9 and update its version badge
  • Bump orchestrator-infra chart to version 0.2.3 and update its version badge
  • Bump orchestrator-software-templates-infra chart to version 0.2.3 and update its version badge
  • Bump orchestrator-software-templates chart to version 0.1.1 and update its version badge

Summary by Sourcery

Pin helm install commands to specific chart versions in all chart READMEs and bump chart versions and badges to match releases

Enhancements:

  • Add explicit --version flags to helm install commands in chart README files and templates
  • Bump Chart.yaml versions and update version badges for backstage to 4.5.9, orchestrator-infra to 0.2.3, orchestrator-software-templates-infra to 0.2.3, and orchestrator-software-templates to 0.1.1

…ned in the README

This is to make sure that users install the expected version of the chart, especially when reading the README from the release branches
@rm3l rm3l changed the title chore: Add version to the helm install command mentioned in the charts READMEs chore: Add version to the helm install command mentioned in the charts READMEs [RHDHBUGS-2037] Sep 11, 2025
@rm3l rm3l marked this pull request as ready for review September 11, 2025 07:44
@rm3l rm3l requested a review from a team as a code owner September 11, 2025 07:44
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: rm3l <rm3l@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

⚠️ Files changed after running the pre-commit hooks

Those changes should have been pushed automatically to your PR branch.

NOTE: If the PR checks are stuck after this additional commit, manually close the PR and immediately reopen it to trigger the checks again.

@rm3l rm3l closed this Sep 12, 2025
@rm3l rm3l reopened this Sep 12, 2025
@qodo-code-review
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis ✅

RHDHBUGS-2037 - PR Code Verified

Compliant requirements:

  • Update helm install commands in chart READMEs so they install the branch-appropriate chart version (avoid defaulting to latest).
  • Leverage README template so the version flag is auto-updated by pre-commit hooks (no manual maintenance).
  • Apply the change consistently across affected charts.

Requires further human verification:

  • Verify that the README templates render {{ template "chart.version" . }} correctly in the pre-commit/helm-docs pipeline.
  • Confirm the referenced versions are actually published in the Helm repo so the pinned installs succeed.
  • Validate that release branch READMEs also render with the pinned version and result in installing the expected branch-specific chart version.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🔒 No security concerns identified
⚡ Recommended focus areas for review

Template Dependency

The README templates now use {{ template "chart.version" . }} to inject the chart version into helm install commands. Ensure this helper template is defined and available in the helm-docs template set so README generation doesn't fail.

helm install my-backstage redhat-developer/backstage --version {{ template "chart.version" . }}

</details>

<details><summary><a href='https://github.com/redhat-developer/rhdh-chart/pull/239/files#diff-8316e61c38ae132c31764bc73c703fefb6bfe57770e77aa97e63c0f9f490a1fcR50-R50'><strong>Version Alignment</strong></a>

The PR description mentions bumping backstage to 4.5.9, but the code sets 4.5.10 (and README pins 4.5.10). Confirm 4.5.10 is intended and published so the pinned install works as documented.
</summary>

```yaml
version: 4.5.10
📄 References
  1. No matching references available

@qodo-code-review qodo-code-review Bot added the enhancement New feature or request label Sep 12, 2025
@qodo-code-review
Copy link
Copy Markdown

PR Type

Enhancement


Description

  • Pin helm install commands to specific chart versions

  • Bump chart versions across all Helm charts

  • Update version badges in README files

  • Standardize version references in template files


File Walkthrough

Relevant files
Enhancement
12 files
Chart.yaml
Bump backstage chart version to 4.5.10                                     
+1/-1     
README.md
Update version badge and add version flag                               
+3/-3     
README.md.gotmpl
Add version template to helm install command                         
+2/-2     
Chart.yaml
Bump orchestrator-infra chart version to 0.2.3                     
+1/-1     
README.md
Update version badge and add version flag                               
+2/-2     
README.md.gotmpl
Add version template to helm install command                         
+1/-1     
Chart.yaml
Bump orchestrator-software-templates-infra chart version to 0.2.4
+1/-1     
README.md
Update version badge and add version flag                               
+2/-2     
README.md.gotmpl
Add version template to helm install command                         
+1/-1     
Chart.yaml
Bump orchestrator-software-templates chart version to 0.1.1
+1/-1     
README.md
Update version badge and add version flag                               
+2/-2     
README.md.gotmpl
Add version template to helm install command                         
+1/-1     

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Sep 12, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Use direct chart version variable

Rendering {{ template "chart.version" . }} relies on a named template that
helm-docs won't have, causing README generation to fail. Use the chart version
exposed by helm-docs instead. Replace it with {{ .Version }}.

charts/backstage/README.md.gotmpl [31]

-helm install my-backstage redhat-developer/backstage --version {{ template "chart.version" . }}
+helm install my-backstage redhat-developer/backstage --version {{ .Version }}
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that using {{ template "chart.version" . }} might fail helm-docs generation and proposes the standard {{ .Version }}, which improves the robustness of documentation generation.

Medium
Replace undefined template usage

The template "chart.version" helper is not defined in the helm-docs context and
will break README generation. Switch to the built-in chart version field {{
.Version }}.

charts/orchestrator-infra/README.md.gotmpl [23]

-helm install my-orchestrator-infra redhat-developer/redhat-developer-hub-orchestrator-infra --version {{ template "chart.version" . }}
+helm install my-orchestrator-infra redhat-developer/redhat-developer-hub-orchestrator-infra --version {{ .Version }}
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that {{ template "chart.version" . }} is likely undefined in the helm-docs context and suggests using the correct {{ .Version }} variable, making the template more robust.

Medium
Use helm-docs version field

Avoid using an undefined named template in helm-docs; it will not resolve and
may fail rendering. Use {{ .Version }} which helm-docs provides.

charts/orchestrator-software-templates/README.md.gotmpl [77]

-helm install my-orchestrator-templates redhat-developer/orchestrator-software-templates --version {{ template "chart.version" . }}
+helm install my-orchestrator-templates redhat-developer/orchestrator-software-templates --version {{ .Version }}
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential issue with helm-docs rendering by replacing the non-standard {{ template "chart.version" . }} with the correct {{ .Version }} variable, improving documentation automation.

Medium
  • Update

@sonarqubecloud
Copy link
Copy Markdown

@rm3l rm3l enabled auto-merge (squash) September 16, 2025 13:32
@rm3l rm3l added the lgtm label Sep 16, 2025
@rm3l rm3l merged commit 5dab63f into redhat-developer:main Sep 16, 2025
8 of 9 checks passed
@rm3l rm3l deleted the add_version_to_charts_READMEs branch September 16, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant