Skip to content

fix: released binaries registered no services - #131

Merged
skyoo2003 merged 1 commit into
mainfrom
fix/goreleaser-drops-service-registrations
Aug 10, 2026
Merged

fix: released binaries registered no services#131
skyoo2003 merged 1 commit into
mainfrom
fix/goreleaser-drops-service-registrations

Conversation

@skyoo2003

Copy link
Copy Markdown
Owner

Found by the post-release verification step on v1.0.0, minutes after publishing.

Symptom

Every published v1.0.0 binary exits immediately:

level=ERROR msg="failed to init service" service=s3 error="unknown service: s3"

Cause

.goreleaser.yaml set main: cmd/devcloud/main.go — a single file, not the package. cmd/devcloud/imports.go holds all 104 service blank imports (103 lines) and is the only place services register themselves. Building one file drops it, and main.go references nothing from it, so the compile succeeds and the registry comes up empty.

Same commit, two builds:

Build Result
go build ./cmd/devcloud (what the gates ran) 104 services, DevCloud ready
go build cmd/devcloud/main.go (what GoReleaser ran) unknown service: s3, exit

Why 775 passing tests missed it

release.yml built the compat binary with go build -o dist/devcloud ./cmd/devcloud, under a comment claiming "Same build configuration as .goreleaser.yaml, so the 775 tests below exercise the artifact this tag is about to publish." It matched only CGO_ENABLED. The suite passed against a binary that was never shipped.

This is #128's lesson in a new form — released artifacts diverging from tested ones.

Fix

  1. .goreleaser.yamlmain: ./cmd/devcloud
  2. release.yml — the compat gate now builds with goreleaser build --single-target, so the 775 tests run against what actually ships. The divergence can't reopen.

Verified locally: goreleaser build --single-target --snapshot → binary boots, DevCloud ready, 104 services, zero unknown service.

Release notes

v1.0.0 is being withdrawn and re-tagged on this commit, so the entry was added to changes/v1.0.0.md (hand-written in changie's format — its fragments were already consumed by the batch) and CHANGELOG.md regenerated with changie merge. Notes still validate: one heading, 35 entries, zero empty issue links.

GoReleaser built cmd/devcloud/main.go — a single file — rather than the
package. That drops imports.go, the only place the 104 services blank-import
themselves into the registry. main.go references nothing from imports.go, so
the compile succeeded and the binary exited at startup with
"unknown service: s3".

v1.0.0 published six archives, a Homebrew formula and four container tags on
that binary. The 775-test boto3 gate passed throughout because it ran
'go build ./cmd/devcloud' while claiming to match .goreleaser.yaml; it matched
only CGO_ENABLED. The gate now builds with GoReleaser, so it cannot again
vouch for a binary that is not the one shipped.
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci CI/CD workflows and scripts labels Aug 10, 2026
@skyoo2003 skyoo2003 self-assigned this Aug 10, 2026
@skyoo2003
skyoo2003 merged commit 2109922 into main Aug 10, 2026
8 checks passed
@skyoo2003
skyoo2003 deleted the fix/goreleaser-drops-service-registrations branch August 10, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows and scripts documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant