Skip to content

build(helm): Set up Spider Huntsman Helm chart scaffolding and linting. - #383

Merged
20001020ycx merged 14 commits into
y-scope:mainfrom
20001020ycx:build/2026-07-09-spider-helm-lint
Jul 13, 2026
Merged

build(helm): Set up Spider Huntsman Helm chart scaffolding and linting.#383
20001020ycx merged 14 commits into
y-scope:mainfrom
20001020ycx:build/2026-07-09-spider-helm-lint

Conversation

@20001020ycx

@20001020ycx 20001020ycx commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

See PR title.

Note

This PR is part of the ongoing work Spider Huntsman k8s integration. More PRs will be submitted until the Helm chart is complete and fully functional for Spider Huntsman.

Note for reviewer:

The taskfile implementation is a close copy from CLP:

The only intentional deviations are the task aliases (helm-check/helm-fix, to match Spider's <lang>-check/<lang>-fix naming).

Checklist

  • The PR satisfies the [contribution guidelines][yscope-contrib-guidelines].
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • helm lint and yamllint --strict pass on the committed YAML.
  • task lint:helm-check resolves the full ct lint pipeline and passes.
  • task lint:check passes.

Summary by CodeRabbit

  • New Features
    • Added an initial Helm chart for deploying the Spider application, including chart metadata and packaging exclusions.
  • Developer Tools
    • Extended lint workflows to validate Helm charts.
    • Added a dedicated Helm toolchain setup to run chart-testing and install Helm 4 consistently.
    • Enabled safer pipeline failure propagation by turning on pipefail.
  • Chores
    • Added Yamale to development dependencies.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a Spider Helm chart scaffold, provisions chart-testing and Helm tooling, and integrates Helm linting into Task and CI development workflows with pipeline failure propagation.

Changes

Helm linting integration

Layer / File(s) Summary
Define the Spider Helm chart
tools/deployment/spider-helm/*
Adds chart metadata, values content, and package ignore patterns for the Spider deployment chart.
Provision Helm tooling
taskfiles/toolchains.yaml
Adds remote taskfile support and a one-time task that installs chart-testing and Helm, then writes the Helm environment file.
Run Helm linting in development checks
requirements-dev.txt, taskfile.yaml, taskfiles/lint.yaml, .github/workflows/code-linting-checks.yaml
Adds Yamale, enables pipeline failure propagation, exposes Helm check and fix tasks, and runs Helm checks in CI.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LintTask
  participant HelmTask
  participant Toolchain
  participant ChartTesting
  LintTask->>HelmTask: run check-helm or fix-helm
  HelmTask->>Toolchain: activate Helm and the lint virtual environment
  HelmTask->>ChartTesting: run ct lint for tools/deployment
Loading
🚥 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 clearly matches the main change: adding Spider Huntsman Helm chart scaffolding and linting support.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

20001020ycx added a commit to 20001020ycx/spider that referenced this pull request Jul 10, 2026
…dalone.

`ct lint` requires a values.yaml in every chart, so PR y-scope#383 could not pass its own
`task lint:helm` without one. Add the generic scaffold keys (nameOverride/fullnameOverride);
the storage/mariadb values are added in y-scope#384.
@20001020ycx 20001020ycx changed the title build(helm-chart): Set up Helm chart scaffolding and chart-testing linting. build(helm-chart): Set up skeleton Helm chart and linting tasks for Spider Huntsman. Jul 10, 2026
@20001020ycx 20001020ycx changed the title build(helm-chart): Set up skeleton Helm chart and linting tasks for Spider Huntsman. build(helm-chart): Set up skeleton Helm chart with its linting tasks for Spider Huntsman. Jul 10, 2026
@20001020ycx
20001020ycx marked this pull request as ready for review July 10, 2026 15:04
@20001020ycx
20001020ycx requested review from a team and sitaowang1998 as code owners July 10, 2026 15:04
@20001020ycx
20001020ycx requested a review from junhaoliao July 10, 2026 15:16
Comment thread taskfiles/lint.yaml Outdated

- task: "cmake-check"
- task: "cpp-check"
- task: "helm-check"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

My bad. xxx-check is an obsolete convention. The latest convention is to use check-xxx. For example check-rust. I am ok with both in this PR. @LinZhihao-723 Shall we create a cleanup PR after this one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

okay, thanks for the catch, good to know

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 actually prefer check-xxx, as we should always use the latest convention when both exist.
fyi, Rust linting is called fix-rust and check-rust.

*~
# Various IDEs
*.tmproj
.idea/

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

For RustRover, we probably need to ignore target/.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Actually, just dived a bit more on the .helmignore: this ignore file is controlling what files are put into the .tgz during helm package, the .tgz file is the artifact distributed to k8s user.

So, helm package only reads the chart directory and re-bundles its own files into a tarball — it compiles nothing and creates no target/ and no build/. So target/ is not, and never will be, a product of helm package.

I will just use the version inherited from the CLP package for consistency then.

…nting.

Adds the Spider Helm chart skeleton (Chart.yaml + .helmignore) and wires CLP-style chart
linting: a `helm` toolchain (chart-testing + Helm), a `lint:helm` task running `ct lint`, and
`yamale` for Chart.yaml schema validation. The chart's templates and values follow in a
separate PR.
…dalone.

`ct lint` requires a values.yaml in every chart, so PR y-scope#383 could not pass its own
`task lint:helm` without one. Add the generic scaffold keys (nameOverride/fullnameOverride);
the storage/mariadb values are added in y-scope#384.
@20001020ycx
20001020ycx force-pushed the build/2026-07-09-spider-helm-lint branch from 6b95fed to f9b5fc8 Compare July 10, 2026 22:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
taskfiles/toolchains.yaml (1)

84-118: 🩺 Stability & Availability | 🔵 Trivial | 🏗️ Heavy lift

Consider adding checksum validation for the Helm toolchain.

The Rust task includes full checksum validation (utils:checksum:validate / utils:checksum:compute) to detect stale or corrupted installations, but the Helm task only uses run: "once". If the Helm toolchain installation is interrupted, run: "once" won't re-run it in the same session, requiring a manual rm -rf of G_HELM_TOOLCHAIN_DIR.

This can be deferred to a follow-up PR, but mirroring the Rust task's checksum pattern would improve reliability.

🤖 Prompt for 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.

In `@taskfiles/toolchains.yaml` around lines 84 - 118, Helm installation lacks
checksum-based validation and can remain incomplete after an interrupted run.
Update the helm task’s run logic to mirror the Rust task’s
utils:checksum:validate/utils:checksum:compute pattern, validating the installed
G_HELM_TOOLCHAIN_DIR and re-running installation when the checksum is missing or
stale, while preserving the existing download and environment-file setup.
🤖 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 `@taskfiles/toolchains.yaml`:
- Around line 110-111: Pin the Helm installer download in the relevant toolchain
command to the immutable tagged release URL for v4.2.3 instead of the mutable
main branch, while preserving the existing curl options and installer arguments.

---

Nitpick comments:
In `@taskfiles/toolchains.yaml`:
- Around line 84-118: Helm installation lacks checksum-based validation and can
remain incomplete after an interrupted run. Update the helm task’s run logic to
mirror the Rust task’s utils:checksum:validate/utils:checksum:compute pattern,
validating the installed G_HELM_TOOLCHAIN_DIR and re-running installation when
the checksum is missing or stale, while preserving the existing download and
environment-file setup.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7e345885-f0dd-4a8d-95f3-896832138264

📥 Commits

Reviewing files that changed from the base of the PR and between d4125c0 and f9b5fc8.

📒 Files selected for processing (6)
  • requirements-dev.txt
  • taskfiles/lint.yaml
  • taskfiles/toolchains.yaml
  • tools/deployment/spider-helm/.helmignore
  • tools/deployment/spider-helm/Chart.yaml
  • tools/deployment/spider-helm/values.yaml

Comment thread taskfiles/toolchains.yaml Outdated
@20001020ycx 20001020ycx changed the title build(helm-chart): Set up skeleton Helm chart with its linting tasks for Spider Huntsman. build(helm-chart): Set up skeleton Helm chart with linting tasks for Spider Huntsman. Jul 10, 2026

@junhaoliao junhaoliao 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.

for the title, how about

build(helm): Set up Spider Helm chart scaffolding and linting.

Comment thread taskfiles/toolchains.yaml Outdated
Comment thread taskfiles/toolchains.yaml Outdated
Comment thread taskfiles/lint.yaml Outdated
Comment thread taskfiles/lint.yaml Outdated
@@ -0,0 +1,2 @@
nameOverride: ""
fullnameOverride: ""

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.

mind explaining what those are and how they are used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The values.yaml here is only a placeholder so ct lint has a values file to validate against — linting fails if the file is missing, but its content is irrelevant.

nameOverride/fullnameOverride aren't required for linting and nothing in the chart references them yet, so I've dropped them and left the file empty. I will add the actual content in the follow-up PR.

@20001020ycx

Copy link
Copy Markdown
Contributor Author

for the title, how about

build(helm): Set up Spider Helm chart scaffolding and linting.

LOL, this was the initial one that ai suggested. Sure, I will just add Huntsman for clarity then

@20001020ycx 20001020ycx changed the title build(helm-chart): Set up skeleton Helm chart with linting tasks for Spider Huntsman. build(helm): Set up Spider Huntsman Helm chart scaffolding and linting. Jul 11, 2026
@20001020ycx
20001020ycx requested a review from junhaoliao July 12, 2026 03:50
junhaoliao
junhaoliao previously approved these changes Jul 12, 2026
steps:
- uses: "actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd" # v6.0.2
with:
submodules: "recursive"

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.

sorry for missing this -

do we need fetch-depth: 0 for helm check to work?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think I know what you meant, I believe ct -all shall solve the problem.

I'm assuming you're referring to this error we hit when the workflow ran without --all:

Error: failed linting charts: failed identifying charts to process: targetBranch 'origin/main' does not exist

--all skips that git-diff with origin/main and lints every chart directly, as you can see, lint-common passes are green now.

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 see. do you know if the version bump check would also need to use git diff?

in fact, the fetch-depth: 0 option is also specified in the official example: https://github.com/helm/chart-testing-action#:~:text=with%3A%0A%20%20%20%20%20%20%20%20%20%20fetch%2Ddepth%3A%200

either way, the CLP repo will not use the --all option because it will integrate the spider helm chart as a subchart. then for consistency i think it's better to follow the same in spider?

LinZhihao-723
LinZhihao-723 previously approved these changes Jul 13, 2026
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.

4 participants