helm-docs as pre-commit marked as failed but successfully replaces files
AaronSeibert opened this issue · 1 comments
AaronSeibert commented
Having some trouble figuring out why they helm-docs pre-commit hook is failing. Any time new readmes get generated, it fails the first time. It generates the README files, and re-committing while adding the newly generating README files then works without failure. I’ve tried enabling trace logs for helm-docs, but not seeing anything that would indicate the failure:
❯ pre-commit --version
pre-commit 3.1.1
❯ helm-docs --version
helm-docs version 1.11.0
Helm Docs................................................................Failed
- hook id: helm-docs
- files were modified by this hook
DEBU[2023-03-11T12:05:51-05:00] No ignore file found at /Volumes/PortableOne/Projects/Personal/helm-charts/.helmdocsignore, using empty ignore rules
INFO[2023-03-11T12:05:51-05:00] Found Chart directories [base, paperless, paperless-ngx, postgres, redis]
DEBU[2023-03-11T12:05:51-05:00] Rendering from optional template files [./_templates.gotmpl, README.md.gotmpl]
DEBU[2023-03-11T12:05:51-05:00] Rendering from optional template files [./_templates.gotmpl, README.md.gotmpl]
INFO[2023-03-11T12:05:51-05:00] Generating README Documentation for chart charts/postgres
INFO[2023-03-11T12:05:51-05:00] Generating README Documentation for chart charts/redis
INFO[2023-03-11T12:05:51-05:00] Generating README Documentation for chart charts/paperless-ngx
INFO[2023-03-11T12:05:51-05:00] Generating README Documentation for chart charts/base
WARN[2023-03-11T12:05:51-05:00] Chart in "charts/paperless" has a remote dependency "base". Dependency values will not be included.
WARN[2023-03-11T12:05:51-05:00] Chart in "charts/paperless" has a remote dependency "paperless-ngx". Dependency values will not be included.
WARN[2023-03-11T12:05:51-05:00] Chart in "charts/paperless" has a remote dependency "postgres". Dependency values will not be included.
WARN[2023-03-11T12:05:51-05:00] Chart in "charts/paperless" has a remote dependency "redis". Dependency values will not be included.
INFO[2023-03-11T12:05:51-05:00] Generating README Documentation for chart charts/paperless
DEBU[2023-03-11T12:05:51-05:00] Using template files [./_templates.gotmpl README.md.gotmpl] for chart charts/base
DEBU[2023-03-11T12:05:51-05:00] Using template files [./_templates.gotmpl README.md.gotmpl] for chart charts/paperless-ngx
DEBU[2023-03-11T12:05:51-05:00] Using template files [./_templates.gotmpl README.md.gotmpl] for chart charts/redis
DEBU[2023-03-11T12:05:51-05:00] Using template files [./_templates.gotmpl README.md.gotmpl] for chart charts/postgres
DEBU[2023-03-11T12:05:51-05:00] Using template files [./_templates.gotmpl README.md.gotmpl] for chart charts/paperless
.pre-commit-config.yaml:
repos:
- repo: https://github.com/norwoodj/helm-docs
rev: v1.11.0
hooks:
- id: helm-docs
args:
# Make the tool search for charts only under the `charts` directory
- --chart-search-root=charts
# The `./` makes it relative to the chart-search-root set above
- --template-files=./_templates.gotmpl
# Repeating the flag adds this to the list, now [./_templates.gotmpl, README.md.gotmpl]
# A base filename makes it relative to each chart directory found
- --template-files=README.md.gotmpl
# Document our dependency values
- --document-dependency-values
# Sort values based on file order, not alphanumeric
- --sort-values-order=file
# Increase log level to try to figure out why it's marking as failed
- --log-level=trace
I’m not really sure where else to go from here troubleshooting wise. This is a new implementation of both helm-docs and pre-commit, so I can’t say that it was previously working.
AaronSeibert commented
I’m going to close this as further research in to this it is by design in the pre-commit package.