Skip to content

fix(taskfile): decouple tool installs; bump chainsaw to v0.2.15#38

Merged
ecv merged 1 commit into
mainfrom
fix/task-generate-chainsaw
Jun 4, 2026
Merged

fix(taskfile): decouple tool installs; bump chainsaw to v0.2.15#38
ecv merged 1 commit into
mainfrom
fix/task-generate-chainsaw

Conversation

@ecv

@ecv ecv commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Closes #36.

Problem

install-tools was one task that installed every dev tool under set -e, and was a hard deps of generate, manifests, test, and lint. chainsaw v0.2.12 no longer compiles under Go 1.26 (its runner predates testing.testDeps.ModulePath):

.../kyverno/chainsaw@v0.2.12/pkg/runner/run.go:69:25: cannot use deps ... missing method ModulePath
task: Failed to run task "generate": task: Failed to run task "install-tools": exit status 1

So a broken e2e tool blocked all codegen, lint, and unit-test work — none of which need chainsaw.

Fix

  • Decouple install-tools into per-tool tasks, each with its own status: guard: install:controller-gen, install:defaulter-gen, install:golangci-lint, install:chainsaw, install:crdoc, install:setup-envtest. install-tools stays as an aggregate (deps all) for one-shot / CI setup.
  • Re-scope each task's deps to the tool it actually uses:
    task now depends on
    generate, manifests install:controller-gen
    test install:setup-envtest
    lint install:golangci-lint
    api-docs install:crdoc
    e2e install:chainsaw
  • Bump CHAINSAW_VERSION v0.2.12v0.2.15 (latest; compiles under Go 1.26).

A single tool's install failure no longer cascades into unrelated tasks.

Verification

$ task generate    # controller-gen only → exit 0
$ task manifests   # controller-gen only → exit 0
$ task install:chainsaw  # installs v0.2.15 → exit 0; ./bin/chainsaw version → v0.2.15

task --list parses; working tree clean (codegen produced no diff against main).

Note (out of scope)

The remote-taskfile includes: still requires TASK_X_REMOTE_TASKFILES=1 to be set before any task parses. That's a separate environmental concern from the chainsaw compile failure this issue covers.

🤖 Generated with Claude Code

`install-tools` was a single task that installed every tool under `set -e`
and was a hard `deps` of generate, manifests, test, and lint. chainsaw
v0.2.12 fails to compile under Go 1.26 (its runner predates
testing.testDeps.ModulePath), so its `go install` aborted the whole task and
blocked all codegen, lint, and unit-test work — none of which need the e2e
runner.

- Split `install-tools` into per-tool tasks (`install:controller-gen`,
  `install:defaulter-gen`, `install:golangci-lint`, `install:chainsaw`,
  `install:crdoc`, `install:setup-envtest`), each with its own status guard.
  `install-tools` stays as an aggregate (deps all) for one-shot/CI setup.
- Re-scope task deps to the tool actually used: generate/manifests ->
  controller-gen, test -> setup-envtest, lint -> golangci-lint, api-docs ->
  crdoc, e2e -> chainsaw. A single tool's install failure no longer blocks
  unrelated tasks.
- Bump CHAINSAW_VERSION v0.2.12 -> v0.2.15 (compiles under Go 1.26).

Verified: `task generate`, `task manifests`, `task install:chainsaw`
(installs v0.2.15) all succeed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ecv ecv requested a review from kevwilliams June 4, 2026 16:02
@ecv ecv enabled auto-merge (squash) June 4, 2026 16:03
@ecv ecv requested a review from scotwells June 4, 2026 16:04
@ecv ecv merged commit 37b25f5 into main Jun 4, 2026
3 checks passed
@ecv ecv deleted the fix/task-generate-chainsaw branch June 4, 2026 17:58
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.

task generate / install-tools fails: chainsaw v0.2.12 won't compile under Go 1.26

2 participants