Skip to content

build(tasks): take the common tasks from go-tools - #85

Merged
aledbf merged 1 commit into
mainfrom
tasks/shared
Nov 22, 2026
Merged

aledbf merged 1 commit into
mainfrom
tasks/shared

Conversation

@aledbf

@aledbf aledbf commented Nov 22, 2026

Copy link
Copy Markdown
Member

Why

The maintenance tasks every spin-stack repository has (versions, bump, release, lint:workflows, consumers) should mean the same thing in every repository, without depending on who wrote the Taskfile. go-tools ships them once and a repository takes them with one include. This repository had a versions.yaml and no task that says what is behind, no workflow lint, and a task named release that meant something else.

What changed

  • go.mod: github.com/spin-stack/go-tools from v0.20261118.9 to v0.20261122.5. go mod tidy moved nothing else.
  • Taskfile.yml: the include of {{.GO_TOOLS_TASKS}}, flattened, with no vars.
  • Taskfile.yml: the task release (it runs goreleaser release --clean) is release:artifacts. Task refuses a Taskfile that defines a name the include defines (Found multiple tasks (release) included by "common", exit 203). No workflow called it. The two notes in versions.yaml that named it follow.
  • Taskfile.yml: lint runs lint:workflows, so CI and the release gate run it.
  • versions.yaml: an actionlint pin (v1.7.12, kind module, spin's version), which lint:workflows reads. The header names the tasks.
  • .github/actionlint.yaml: the docker8 fleet's runner label. Without it actionlint fails on go-cli.yml:291 and release.yml:83 (label "runs-on/fleet=docker8/env=production" is unknown).

Scope

How this tool is released does not change. release.yml, .goreleaser.yml and every release:* task the workflow runs are untouched.

The common release is present and refuses (missing required variables: GATE_WORKFLOW, GATE_JOBS), as it does in spin. It is not configured here because it would change the release, and that is a decision for its own PR:

  • Every one of the five tags was made by release.yml on a dispatch, as github-actions[bot], after the gate. The names are already v<YYYYMMDD>.<NN>, so the naming is not the obstacle.
  • The release gate is wider than anything go-cli.yml runs on a push: e2e, the whole runtime matrix and publish parity. A push runs only the runtime cases its diff can affect. proven on go-cli.yml would prove less than the release asks today.
  • The common task publishes the GitHub release when it tags (gh release create --latest). Here GoReleaser fills a draft and a person publishes it once the archives are attached. With the common task the latest release would have no archives until the build finished, and for good if the build failed.

Blast Radius

  • Anyone who typed go tool task release -- --snapshot now types go tool task release:artifacts -- --snapshot. go tool task release refuses and builds nothing.
  • lint is slower by one go run of actionlint, and a workflow edit that actionlint rejects, or an action pinned by tag, now fails lint.
  • The common tasks follow go-tools' latest release, not go.mod: a later go-tools release can change versions, bump and lint:workflows here with no commit.
  • No release, tag, image or published artefact is touched.

Verification

  • go tool task --list: exit 0, the five common tasks and release:artifacts listed.
  • go tool task versions: exit 201 with and without GITHUB_TOKEN, 2 behind (node and distroless digests; not moved here).
  • go tool task lint:workflows: exit 201 before .github/actionlint.yaml, exit 0 after.
  • go tool task bump NAME=actionlint TO=v1.7.12: exit 0, file unchanged. go tool task bump: exit 206, missing required variables: NAME.
  • go tool task consumers: exit 201, no consumers.toml. go tool task release and release RELEASE_DRY=1: exit 206. Five tags before and after.
  • TestVersionsYAMLIsTheOnlyPin: passes, and fails with the actionlint entry removed (Taskfile.yml includes go-tools' tasks, and its task lint:workflows reads actionlint).
  • go tool task lint, test:unit, vuln: exit 0.
  • go tool task release:artifacts -- --snapshot: exit 201, goreleaser is required (not installed on this machine). .goreleaser.yml is unchanged, so goreleaser check was not run.
  • Left to CI: test:race, coverage, e2e, the parity lanes (this diff touches Taskfile.yml and go.mod, so the whole runtime matrix runs) and build:cross.

Part of spin-stack/go-tools#135

🤖 Generated with Claude Code

versions, bump, release, lint:workflows and consumers now come from
go-tools' release, through one include, with the names and arguments
they have in every spin-stack repository. go-tools moves to
v0.20261122.5, the first module whose `go tool task` names that file
and whose versions gate counts what its tasks read.

The task that runs GoReleaser was named release, a name the include
defines, and Task refuses a Taskfile that has both. It is
release:artifacts now, after what it does. No workflow called it:
release.yml runs GoReleaser through its action.

The common release is taken without a gate, so it refuses. A release
here is still release.yml's, dispatched: it runs e2e, the whole runtime
matrix and publish parity on the commit before tagging it, and
GoReleaser fills a draft a person publishes. Moving that onto the
common task changes how the tool is released and is not done here.

lint runs lint:workflows, so actionlint is pinned (v1.7.12, spin's) and
.github/actionlint.yaml names the docker8 fleet's runner label, which
actionlint otherwise reports as unknown.

Part of spin-stack/go-tools#135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@aledbf
aledbf merged commit 7000396 into main Nov 22, 2026
13 checks passed
@aledbf
aledbf deleted the tasks/shared branch November 22, 2026 17:33
aledbf added a commit to spin-stack/go-tools that referenced this pull request Nov 22, 2026
…ommand line can spell

Every repository that includes the common tasks has a `release`, and it refused
in the ones that do not release only because two vars were absent. Under Task
3.54.0 a var of the command line or the environment reaches an included task
wherever the include states none of that name. spin-machine, which is released
by its own workflow, and spin-ami, which cuts no release, both have a ci.yml
with a job named Gate, the values the pages showed: there
`go tool task release GATE_WORKFLOW=ci.yml GATE_JOBS=Gate` named a release, and
without RELEASE_DRY would have published an empty one marked latest
(spin-stack/machine#529, spin-stack/ami#212).

A repository now states how it is released in one var of the include, RELEASE,
a map: `proof` and `jobs` where this task cuts the releases, with `files`;
`elsewhere`, naming the workflow, where it releases but not with this task,
as the four repositories whose release is built from its tag do; `none` where
it does not release. They are keys and not a comment so that a gate can read
them (spin-stack/devcontainer-cli#85 had only a comment to write).

The command line and the environment hold strings, and no string is a map;
where the include states the map it wins over both; and the task reads it
through vars of its own, which Task reads after every other. So a repository
that states nothing, `elsewhere` or `none` is refused with that reason whatever
is typed, and one that releases is asked the proof and the jobs it states and
no others. The tests run each case under Task.

GATE_WORKFLOW, GATE_JOBS and RELEASE_FILES are read by nothing. "Gate" is the
required check's name in spin-ami, and the two vars were set there for that
reason. go-tools' own include states the map, and every other repository that
set the vars states it in a commit of its own.

Part of #135

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

1 participant