Skip to content

fix(ci): make pre-commit self-install helm-docs v1.15.1, regenerate READMEs - #829

Open
rm3l wants to merge 1 commit into
redhat-developer:mainfrom
rm3l:fix/pin-helm-docs
Open

rm3l wants to merge 1 commit into
redhat-developer:mainfrom
rm3l:fix/pin-helm-docs

Conversation

@rm3l

@rm3l rm3l commented Dec 4, 2026

Copy link
Copy Markdown
Member

Description of the change

Fixes the Pre-commit CI failures that started hitting every PR on Dec 1, 2026.

Root cause: the workflows installed helm-docs with go install ...@latest, and helm-docs v1.15.0 (norwoodj/helm-docs#296) changed the generated Maintainers table header from Url to URL. The helm-docs hook therefore rewrote every chart README on every PR, including completely unrelated ones (e.g. #827).

  • Switch the pre-commit hook from helm-docs (language: script — it just wraps whatever helm-docs binary is on PATH, which is why the unpinned CI install bit us) to helm-docs-built (language: golang) at rev v1.15.1: pre-commit now builds the pinned helm-docs version itself, so no manual installation is needed and the generated output cannot drift with @latest. Future helm-docs bumps now show their README impact in the bump PR itself.
  • Drop the unpinned go install ...@latest steps from pre-commit.yaml, bump-version.yaml and sync-lightspeed-configs.yaml (setup-go stays — pre-commit needs it to build the hook).
  • Regenerate the chart READMEs with helm-docs v1.15.1 (Url → URL, plus trailing-newline normalization).
  • Ignore the deprecated backstage chart entirely: exclude: on the pre-commit hook plus .helmdocsignore, so its README stays frozen and it is never re-released.
  • Patch-bump the updated charts so chart-releaser publishes the regenerated READMEs: rhdh 3.5.21, must-gather 0.8.4, orchestrator-infra 0.8.5, orchestrator-software-templates 0.7.1, orchestrator-software-templates-infra 0.6.1.

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

How to test changes / Special notes to the reviewer

  • The Pre-commit workflow on this PR is itself the test: it must pass with the regenerated READMEs.
  • pre-commit run --all-files passes locally with no helm-docs binary on PATH (pre-commit builds v1.15.1 itself), and is idempotent — a second run produces no diff.
  • The deprecated backstage chart keeps its original README and version (7.0.99): it is excluded from both the hook and helm-docs via .helmdocsignore.
  • Existing open PRs should go green after rebase/re-run once this merges.

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. (No schema changes were needed; the jsonschema-dereference hook ran clean.)
  • Tests pass using the Chart Testing tool and the ct lint command. (Not run locally; changes are version bumps and generated docs only.)
  • 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. (Not applicable — orchestrator-infra changes are version bump + README regeneration only.)

@rm3l
rm3l requested a review from a team as a code owner December 4, 2026 20:58
@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

fix(ci): pin helm-docs to v1.15.1 and regenerate chart READMEs

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Pins helm-docs to v1.15.1 via pre-commit's helm-docs-built golang hook, removing unpinned
 @latest installs from three workflows.
• Regenerates chart READMEs with helm-docs v1.15.1, fixing the Url to URL header change that
 broke pre-commit on every PR.
• Excludes the deprecated backstage chart from the hook and helm-docs, and patch-bumps five charts
 so READMEs get published.
Merge Risk 🟡 Medium

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: Chart documentation and validation automation, Helm chart release management.
  • The changed Chart.yaml version fields control the release identity of the affected charts.
  • Their README version references are documentation-only, while the chart files participate in packaging and consumer version selection; no rendered templates or runtime capabilities changed.
  • The changed pre-commit configuration, ignore file, and workflow setup steps jointly determine how chart documentation is checked and regenerated in repository automation.
  • They affect one bounded validation capability; they do not alter deployed chart templates or runtime consumers.
Sources

charts/rhdh/Chart.yaml[1-5]

apiVersion: v2
name: redhat-developer-hub
type: application
version: 3.5.21
appVersion: 2.2.0

.helmdocsignore[1-4]

charts/backstage/vendor

# The deprecated backstage chart is frozen: its README is never regenerated.
charts/backstage

.pre-commit-config.yaml[1-13]

repos:
  - repo: https://github.com/norwoodj/helm-docs
    rev: v1.15.1
    hooks:
      # `helm-docs-built` (language: golang) makes pre-commit build the helm-docs
      # binary itself at the rev pinned above, so no separate installation is
      # needed and the generated README output cannot drift with `@latest`.
      # Go is required on PATH.
      - id: helm-docs-built
        files: (README\.md(\.gotmpl)?|(Chart|requirements|values)\.ya?ml)$
        # The deprecated backstage chart is frozen: never regenerate its
        # README or release it again (also excluded via charts/.helmdocsignore)
        exclude: ^charts/backstage/
Behavioral complexity 🟡 Medium 🧩 Compatibility cases

  • Before, workflows installed helm-docs separately and the pre-commit hook used the prior revision; after, pre-commit builds v1.15.1 itself and depends on the workflow-provided Go toolchain, while backstage is excluded.
  • The new correctness condition is compatibility among the pinned hook, Go environment, pre-commit execution, chart file matching, and intentional backstage exclusion.
  • The workflows retain explicit Go setup, so no new runtime application state or concurrency protocol is introduced.
Sources

.pre-commit-config.yaml[1-13]

repos:
  - repo: https://github.com/norwoodj/helm-docs
    rev: v1.15.1
    hooks:
      # `helm-docs-built` (language: golang) makes pre-commit build the helm-docs
      # binary itself at the rev pinned above, so no separate installation is
      # needed and the generated README output cannot drift with `@latest`.
      # Go is required on PATH.
      - id: helm-docs-built
        files: (README\.md(\.gotmpl)?|(Chart|requirements|values)\.ya?ml)$
        # The deprecated backstage chart is frozen: never regenerate its
        # README or release it again (also excluded via charts/.helmdocsignore)
        exclude: ^charts/backstage/

.helmdocsignore[1-4]

charts/backstage/vendor

# The deprecated backstage chart is frozen: its README is never regenerated.
charts/backstage
Potential damage 🟡 Medium 🩹 Recoverable

  • If a version identity regresses, publication or consumer selection can fail or select an unintended chart artifact.
  • Reverting restores the source metadata, but an already published incorrect artifact may require repository cleanup or republishing.
  • No persistent application state or external business effect is changed by these version fields alone.
  • Source correction and republishing can restore the intended chart identity; already indexed artifacts may need release maintenance.
Sources

charts/rhdh/Chart.yaml[1-5]

apiVersion: v2
name: redhat-developer-hub
type: application
version: 3.5.21
appVersion: 2.2.0
Assessed commit 87be1bd
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin go install version in each workflow
  • ➕ Smallest diff, no change to pre-commit config
  • ➕ Keeps the existing script hook
  • ➖ Version is duplicated across three workflow files and can drift
  • ➖ Local developers still need a matching binary on PATH
2. Use the helm-docs container image hook
  • ➕ No Go toolchain needed in CI
  • ➕ Fully pinned by image digest
  • ➖ Adds Docker dependency to pre-commit runs
  • ➖ Image tag and digest still need maintenance

Recommendation: Keeping the pinned helm-docs-built golang hook is the right approach. It removes the PATH-dependent script hook that let @latest drift CI output. Alternatives were considered: pinning the go install version in each workflow (duplicated across three files, still manual) and a local/system hook that expects a preinstalled binary (same drift risk). The chosen approach keeps one source of truth in .pre-commit-config.yaml.

Files changed (15) +31 / -34

Bug fix (1) +9 / -2
.pre-commit-config.yamlPin helm-docs hook to v1.15.1 and build it via golang +9/-2

Pin helm-docs hook to v1.15.1 and build it via golang

• Bumps the repo rev to v1.15.1 and switches the hook from 'helm-docs' (script, uses PATH binary) to 'helm-docs-built' (golang, builds pinned version). Adds an exclude for 'charts/backstage/'.

.pre-commit-config.yaml

Documentation (5) +15 / -17
README.mdRegenerate README: version badge, URL header, trailing newline +3/-4

Regenerate README: version badge, URL header, trailing newline

• Updates the version badge and install example to 0.8.4, renames the Maintainers column 'Url' to 'URL', and removes a trailing blank line.

charts/must-gather/README.md

README.mdRegenerate README for 0.8.5 and URL header +3/-3

Regenerate README for 0.8.5 and URL header

• Updates the version badge and helm install example to 0.8.5, and renames the Maintainers column 'Url' to 'URL'.

charts/orchestrator-infra/README.md

README.mdRegenerate README for 0.6.1 and URL header +3/-4

Regenerate README for 0.6.1 and URL header

• Updates the version badge and install example to 0.6.1, renames 'Url' to 'URL', and removes a trailing blank line.

charts/orchestrator-software-templates-infra/README.md

README.mdRegenerate README for 0.7.1 and URL header +3/-3

Regenerate README for 0.7.1 and URL header

• Updates the version badge and install example to 0.7.1 and renames 'Url' to 'URL'.

charts/orchestrator-software-templates/README.md

README.mdRegenerate README for 3.5.21 and URL header +3/-3

Regenerate README for 3.5.21 and URL header

• Updates the version badge and install example to 3.5.21 and renames 'Url' to 'URL'.

charts/rhdh/README.md

Other (9) +7 / -15
bump-version.yamlRemove unpinned helm-docs install step +0/-4

Remove unpinned helm-docs install step

• Deletes the 'go install helm-docs@latest' step, so the bump workflow no longer installs an unpinned helm-docs binary. setup-go is kept.

.github/workflows/bump-version.yaml

pre-commit.yamlRemove unpinned helm-docs install step +0/-3

Remove unpinned helm-docs install step

• Deletes the 'go install helm-docs@latest' step. pre-commit now builds the pinned helm-docs itself through the golang hook.

.github/workflows/pre-commit.yaml

sync-lightspeed-configs.yamlRemove unpinned helm-docs install step +0/-3

Remove unpinned helm-docs install step

• Deletes the 'go install helm-docs@latest' step from the sync workflow, removing the unpinned install.

.github/workflows/sync-lightspeed-configs.yaml

.helmdocsignoreIgnore deprecated backstage chart +2/-0

Ignore deprecated backstage chart

• Adds 'charts/backstage' so helm-docs skips the deprecated chart and its README stays frozen.

.helmdocsignore

Chart.yamlPatch-bump must-gather to 0.8.4 +1/-1

Patch-bump must-gather to 0.8.4

• Bumps the chart version from 0.8.3 to 0.8.4 so chart-releaser publishes the regenerated README.

charts/must-gather/Chart.yaml

Chart.yamlPatch-bump orchestrator-infra to 0.8.5 +1/-1

Patch-bump orchestrator-infra to 0.8.5

• Bumps the chart version from 0.8.4 to 0.8.5.

charts/orchestrator-infra/Chart.yaml

Chart.yamlPatch-bump orchestrator-software-templates-infra to 0.6.1 +1/-1

Patch-bump orchestrator-software-templates-infra to 0.6.1

• Bumps the chart version from 0.6.0 to 0.6.1.

charts/orchestrator-software-templates-infra/Chart.yaml

Chart.yamlPatch-bump orchestrator-software-templates to 0.7.1 +1/-1

Patch-bump orchestrator-software-templates to 0.7.1

• Bumps the chart version from 0.7.0 to 0.7.1.

charts/orchestrator-software-templates/Chart.yaml

Chart.yamlPatch-bump rhdh chart to 3.5.21 +1/-1

Patch-bump rhdh chart to 3.5.21

• Bumps the chart version from 3.5.20 to 3.5.21.

charts/rhdh/Chart.yaml

…EADMEs

Pre-commit started failing on unrelated PRs on Dec 1, 2026: the CI
workflows installed helm-docs with @latest, and helm-docs v1.15.0
(norwoodj/helm-docs#296) changed the Maintainers table header from
`Url` to `URL`, so the helm-docs hook rewrote every chart README.

- Switch the pre-commit hook from `helm-docs` (language: script, which
  just wraps whatever binary is on PATH) to `helm-docs-built`
  (language: golang), and bump the repo rev to v1.15.1. pre-commit now
  builds the pinned helm-docs version itself, so no manual installation
  is needed and the generated output cannot drift with @latest.
- Drop the manual `go install ...@latest` steps from pre-commit.yaml,
  bump-version.yaml and sync-lightspeed-configs.yaml (setup-go stays,
  pre-commit needs it to build the hook).
- Regenerate the chart READMEs with helm-docs v1.15.1 (Url -> URL,
  plus trailing-newline normalization).
- Ignore the deprecated backstage chart entirely: exclude it from the
  pre-commit hook and skip it in helm-docs via .helmdocsignore, so its
  README stays frozen and it is never re-released.
- Patch-bump the remaining charts so chart-releaser publishes the
  regenerated READMEs: rhdh 3.5.21, must-gather 0.8.4,
  orchestrator-infra 0.8.5, orchestrator-software-templates 0.7.1,
  orchestrator-software-templates-infra 0.6.1.

Assisted-by: OpenCode
@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Qodo Logo

@rm3l
rm3l force-pushed the fix/pin-helm-docs branch from c083b31 to 87be1bd Compare December 4, 2026 21:00
@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo was deprecated on the 1st of October 2026 and is no longer available. We recommend switching to the latest Qodo review capabilities. Learn more

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Dec 4, 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 (87be1bd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #829   +/-   ##
=======================================
  Coverage   75.93%   75.93%           
=======================================
  Files          22       22           
  Lines        1467     1467           
  Branches      117      117           
=======================================
  Hits         1114     1114           
  Misses        353      353           
Flag Coverage Δ
must-gather 98.23% <ø> (ø)
orchestrator-infra 91.39% <ø> (ø)
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.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant