Skip to content

ci(platform): add helm-docs freshness check to lint workflow#196

Merged
jp-ayyappan merged 2 commits into
mainfrom
ci/add-helm-docs-check
Jun 11, 2026
Merged

ci(platform): add helm-docs freshness check to lint workflow#196
jp-ayyappan merged 2 commits into
mainfrom
ci/add-helm-docs-check

Conversation

@jp-ayyappan

@jp-ayyappan jp-ayyappan commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a helm-docs freshness gate to the existing Helm Lint workflow. After ct lint passes, the job runs helm-docs and fails if any README.md is stale with respect to values.yaml.

Why

Without this check, values.yaml changes that affect the docs table can merge without the README.md being updated, causing the generated documentation to drift silently.

Implementation

  • Installs helm-docs v1.14.2 from the official GitHub release tarball
  • Runs after ct lint on the same list-changed gate so it only executes when chart files are modified
  • Fails with a clear error message and shows the diff if docs are out of date

Test plan

  • Workflow syntax validated locally
  • Merging a values.yaml change without running helm-docs should fail the lint job

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Added automated Helm chart documentation validation to the lint workflow to ensure chart documentation remains accurate and synchronized with repository changes.

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>
@jp-ayyappan jp-ayyappan requested a review from a team as a code owner June 11, 2026 16:46
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jp-ayyappan, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8ec9298b-4385-4fa8-b457-782a283724b4

📥 Commits

Reviewing files that changed from the base of the PR and between d8c3885 and d1bd649.

📒 Files selected for processing (1)
  • .github/workflows/lint.yaml
📝 Walkthrough

Walkthrough

The lint workflow now conditionally validates Helm chart documentation. When charts are changed, it downloads a pinned helm-docs release, runs it to generate documentation, and fails the job if uncommitted changes are detected, ensuring documentation stays synchronized with chart definitions.

Changes

Helm Documentation Validation

Layer / File(s) Summary
Helm-docs installation, execution, and validation
.github/workflows/lint.yaml
Adds three conditional steps: download and extract a pinned helm-docs binary, run it to generate chart documentation, and validate that the generated output is committed (failing the job and logging differences if not).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

📋 A rabbit hops through charts and files,
With docs that gleam and always smile—
Now helm-docs runs and keeps them true,
No stale descriptions ever brew! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a helm-docs freshness check to the lint workflow, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-helm-docs-check

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 27d6171 and d8c3885.

📒 Files selected for processing (1)
  • .github/workflows/lint.yaml

Comment thread .github/workflows/lint.yaml
Comment thread .github/workflows/lint.yaml Outdated
Comment thread .github/workflows/lint.yaml Outdated
Comment thread .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>
@jp-ayyappan

Copy link
Copy Markdown
Contributor Author

All four findings addressed in d1bd649:

  1. Checksum validation — added SHA256 verification matching the existing Helm install pattern
  2. Version alignment — pinned to v1.13.1 to match .pre-commit-config.yaml (was using 1.14.2 which would cause local/CI drift)
  3. --chart-search-root=charts — added to match pre-commit args
  4. Scoped git diff — now checks only charts/*/README.md to avoid false positives from unrelated files

@jp-ayyappan jp-ayyappan enabled auto-merge (squash) June 11, 2026 17:04

@eastokes eastokes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@jp-ayyappan jp-ayyappan merged commit 126e14e into main Jun 11, 2026
14 checks passed
@jp-ayyappan jp-ayyappan deleted the ci/add-helm-docs-check branch June 11, 2026 18:01
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.

3 participants