Fix collector release: tag derivation + decouple GitHub release#18
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
collector-release.ymlfailed. Two distinct problems surfaced across the failed runs, plus a latent third:denied: permission_denied: write_packagepushingghcr.io/last9/l9gpu-collector. The package doesn't exist yet andGITHUB_TOKENis refused creation rights under thelast9org. This is an org-settings fix, not code — see below.workflow_dispatch:github.ref_nameismain, soGORELEASER_CURRENT_TAGbecamemain, producing a:main-amd64image.v0.2.0), which is already owned by the Pythonrelease.yml. Bothcollector-v0.2.0andv0.2.0point at the same commit, so collector artifacts would be attached to the Python release.Changes
collector-v*tag onworkflow_dispatch/branch runs (fail loudly if none).release.disablein.goreleaser.ymland publish archives + checksums viagh release createat the namespacedcollector-vX.Y.Ztag (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/COLLECTOR.md): correct the pinned docker tag format (nocollector-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_deniedis not fixed by this PR. An org owner must allow Actions to create/write thel9gpu-collectorpackage (Org → Settings → Actions → workflow permissions = read/write, and package creation enabled), or pre-create the package and grantlast9/gpu-telemetryWrite under the package's Actions access.Validation
.goreleaser.ymlvalidated withgoreleaser check(OSS,~> v2) — passes (release pipe skipped as intended).