fix: released binaries registered no services - #131
Merged
Conversation
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.
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.
Found by the post-release verification step on v1.0.0, minutes after publishing.
Symptom
Every published v1.0.0 binary exits immediately:
Cause
.goreleaser.yamlsetmain: cmd/devcloud/main.go— a single file, not the package.cmd/devcloud/imports.goholds all 104 service blank imports (103 lines) and is the only place services register themselves. Building one file drops it, andmain.goreferences nothing from it, so the compile succeeds and the registry comes up empty.Same commit, two builds:
go build ./cmd/devcloud(what the gates ran)DevCloud readygo build cmd/devcloud/main.go(what GoReleaser ran)unknown service: s3, exitWhy 775 passing tests missed it
release.ymlbuilt the compat binary withgo 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 onlyCGO_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
.goreleaser.yaml—main: ./cmd/devcloudrelease.yml— the compat gate now builds withgoreleaser 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, zerounknown 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) andCHANGELOG.mdregenerated withchangie merge. Notes still validate: one heading, 35 entries, zero empty issue links.