ci(platform): add helm-docs freshness check to lint workflow#196
Conversation
After chart-testing lint passes, run helm-docs and fail the PR if any README.md is stale with respect to values.yaml. The check is gated on list-changed so it only runs when chart files are modified. Installs helm-docs 1.14.2 from the official GitHub release. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Review limit reached
More reviews will be available in 21 minutes and 25 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe lint workflow now conditionally validates Helm chart documentation. When charts are changed, it downloads a pinned ChangesHelm Documentation Validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/lint.yaml:
- Around line 62-64: Update the "Run helm-docs" CI step so it matches pre-commit
behavior by passing the same chart search root; modify the step that currently
runs '/tmp/helm-docs' to include the flag '--chart-search-root=charts' (look for
the step named "Run helm-docs" and the run command '/tmp/helm-docs') so
helm-docs only searches the charts directory in CI like local pre-commit.
- Around line 66-74: The current check uses a global git diff (--quiet) which
fails on unrelated changes; modify the run block that contains the "if ! git
diff --quiet" logic to scope the diff to chart documentation files only (e.g.,
target charts/**/README.md or the specific chart README path pattern) by passing
a pathspec to git diff (e.g., git diff --quiet -- charts/**/README.md) and
adjust the error message to indicate stale Helm chart docs specifically; update
the same conditional branches (the echo "::error::" message and the subsequent
git diff --stat/git diff) to operate on that scoped path so only chart docs are
considered.
- Around line 53-60: The "Install helm-docs" step downloads the helm-docs
tarball without verifying its SHA256; update that step (referencing the step
name "Install helm-docs" and the env variable HELM_DOCS_VERSION) to fetch or
hardcode the expected SHA256 for the specific release and validate the
downloaded file before extracting (e.g., download or compute the checksum and
run a sha256sum -c or compare computed sha256 against the expected value), and
fail the step if the checksum does not match so the tarball is not extracted.
- Line 56: Update the pinned helm-docs version so CI and pre-commit match:
change the HELM_DOCS_VERSION value or the norwoodj/helm-docs entry in pre-commit
to the same version (e.g., set HELM_DOCS_VERSION: '1.13.1' to match
.pre-commit-config.yaml or update the pre-commit hook to '1.14.2'); ensure the
variable HELM_DOCS_VERSION and the norwoodj/helm-docs version string are
identical to avoid doc drift.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5628afc0-034a-47e4-831b-7139e9ff6a51
📒 Files selected for processing (1)
.github/workflows/lint.yaml
- Pin helm-docs to v1.13.1 to match .pre-commit-config.yaml so local pre-commit and CI produce identical output - Add SHA256 checksum verification for the helm-docs tarball, matching the pattern used for Helm itself (lines 22-25) - Pass --chart-search-root=charts to match pre-commit args - Scope git diff check to 'charts/*/README.md' to avoid false positives from unrelated file changes Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
|
All four findings addressed in d1bd649:
|
eastokes
left a comment
There was a problem hiding this comment.
I don't love it, since it's a separate execution surface that needs to be maintained along side the pre-commit stuff. Also the version/sha isn't in a format that rennovate/dependabot will track. But it's probably good enough for now. I'd love to start pushing more towards tooling like mise where we can manage dependencies/tooling and tasks
Summary
Adds a
helm-docsfreshness gate to the existingHelm Lintworkflow. Afterct lintpasses, the job runshelm-docsand fails if anyREADME.mdis stale with respect tovalues.yaml.Why
Without this check,
values.yamlchanges that affect the docs table can merge without theREADME.mdbeing updated, causing the generated documentation to drift silently.Implementation
helm-docsv1.14.2 from the official GitHub release tarballct linton the samelist-changedgate so it only executes when chart files are modifiedTest plan
values.yamlchange without runninghelm-docsshould fail the lint job🤖 Generated with Claude Code
Summary by CodeRabbit