Uploaded image for project: 'Red Hat Developer Hub Bugs'
  1. Red Hat Developer Hub Bugs
  2. RHDHBUGS-473

[Helm] Running the pre-commit hooks updates the orchestrator-infra chart README.md

XMLWordPrintable

    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • Release Note Not Required
    • RHDH Install 3272

      Description of problem:

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      From the rhdh-chart repo (main branch): https://github.com/redhat-developer/rhdh-chart

      pre-commit run --all-files --verbose
      git diff
      
      1. <steps>

      Actual results:

      $ pre-commit run --all-files --verbose
         
      Helm Docs................................................................Failed
      - hook id: helm-docs
      - duration: 0.01s
      - files were modified by this hook
      
      INFO[2025-03-27T11:09:07+01:00] Found Chart directories [backstage, orchestrator-infra] 
      INFO[2025-03-27T11:09:07+01:00] Generating README Documentation for chart charts/orchestrator-infra 
      INFO[2025-03-27T11:09:07+01:00] Generating README Documentation for chart charts/backstage
      
      jsonschema-dereference...................................................Passed
      - hook id: jsonschema-dereference
      - duration: 0.97s
      
      $ git diff
      diff --git a/charts/orchestrator-infra/README.md b/charts/orchestrator-infra/README.md
      index a6cf328..6eb1a9f 100644
      --- a/charts/orchestrator-infra/README.md
      +++ b/charts/orchestrator-infra/README.md
      @@ -41,3 +41,5 @@ Kubernetes: `>= 1.25.0-0`
       | tests.enabled |  | bool | `true` |
       | tests.image |  | string | `"bitnami/kubectl:latest"` |
       
      +----------------------------------------------
      +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
      
      

      Expected results:

      No change expected. As discussed in https://redhat-internal.slack.com/archives/C06SGFD65NC/p1743010918449459?thread_ts=1742992798.865969&cid=C06SGFD65NC , this might be due to a missing README.md.gotmpl file in the new orchestrator-infra chart that was added recently.

      From the helm-docs instructions:

      The markdown generation is entirely gotemplate driven. The tool parses metadata from charts and generates a number of sub-templates that can be referenced in a template file (by default README.md.gotmpl). If no template file is provided, the tool has a default internal template that will generate a reasonably formatted README.

      I think we should add a custom README.md.gotmpl file, similarly to what is done in the backstage chart: https://github.com/redhat-developer/rhdh-chart/blob/main/charts/backstage/README.md.gotmpl

      This issue was not caught by the checks that passed on the PR that added it in the first place. I guess because there was no exiting files under `charts/orchestrator-infra` to compare the diff with.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

              rh-ee-asoro Armel Soro
              rh-ee-asoro Armel Soro
              RHIDP - Install
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: