Skip to content

Fix collector release: tag derivation + decouple GitHub release#18

Merged
galacto-last9 merged 1 commit into
mainfrom
fix/collector-release-tag-and-publish
Jun 2, 2026
Merged

Fix collector release: tag derivation + decouple GitHub release#18
galacto-last9 merged 1 commit into
mainfrom
fix/collector-release-tag-and-publish

Conversation

@galacto-last9

Copy link
Copy Markdown
Collaborator

Why

collector-release.yml failed. Two distinct problems surfaced across the failed runs, plus a latent third:

  1. GHCR push denied (the active blocker): denied: permission_denied: write_package pushing ghcr.io/last9/l9gpu-collector. The package doesn't exist yet and GITHUB_TOKEN is refused creation rights under the last9 org. This is an org-settings fix, not code — see below.
  2. Tag derivation broke on workflow_dispatch: github.ref_name is main, so GORELEASER_CURRENT_TAG became main, producing a :main-amd64 image.
  3. Release-tag collision (latent): goreleaser (OSS) derives the GitHub release tag from the parsed semver (v0.2.0), which is already owned by the Python release.yml. Both collector-v0.2.0 and v0.2.0 point at the same commit, so collector artifacts would be attached to the Python release.

Changes

  • Tag derivation: use the tag on a tag push; fall back to the latest collector-v* tag on workflow_dispatch/branch runs (fail loudly if none).
  • Decouple the GitHub release: set release.disable in .goreleaser.yml and publish archives + checksums via gh release create at the namespaced collector-vX.Y.Z tag (idempotent on re-runs). goreleaser still builds binaries and pushes the docker image. (monorepo.tag_prefix, the clean fix, is goreleaser Pro-only and rejected by the OSS build CI uses.)
  • Docs (docs/COLLECTOR.md): correct the pinned docker tag format (no collector- prefix on the image tag) and the multi-arch claim (image is amd64-only; arm64 ships as a binary tarball).

Still required (out of band, org admin)

The GHCR permission_denied is not fixed by this PR. An org owner must allow Actions to create/write the l9gpu-collector package (Org → Settings → Actions → workflow permissions = read/write, and package creation enabled), or pre-create the package and grant last9/gpu-telemetry Write under the package's Actions access.

Validation

  • .goreleaser.yml validated with goreleaser check (OSS, ~> v2) — passes (release pipe skipped as intended).
  • Workflow YAML parses.

The collector-release workflow failed on workflow_dispatch because the
"Derive semver" step assumed a tag push: github.ref_name was "main", so
GORELEASER_CURRENT_TAG became "main" and goreleaser produced a
":main-amd64" image.

Three fixes:

1. Derive the semver from the actual tag on a tag push, and fall back to
   the latest collector-v* tag on workflow_dispatch / branch runs (fail
   loudly if none exists).

2. Stop letting goreleaser publish the GitHub release. goreleaser (OSS)
   derives the release tag from the parsed semver (v0.2.0), which is also
   owned by the Python release, so the two collide. Set release.disable
   and publish the archives + checksums ourselves via `gh release create`
   at the namespaced collector-vX.Y.Z tag (idempotent on re-runs).
   goreleaser still builds the binaries and pushes the docker image.

3. Docs: correct the pinned image tag format (no "collector-" prefix on
   the docker tag) and the multi-arch claim (the image is amd64-only;
   arm64 ships as a binary tarball).

Note: the remaining blocker is GHCR write permission for the
ghcr.io/last9/l9gpu-collector package, which needs an org-level settings
change (Actions write packages / package creation), not a code fix.
@galacto-last9 galacto-last9 merged commit 728ebc0 into main Jun 2, 2026
13 checks passed
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.

2 participants