Repository navigation
build(git-remote-entire): stamp commit into per-commit builds - #2700
Open
toothbrush wants to merge 2 commits into
Open
toothbrush wants to merge 2 commits into
toothbrush wants to merge 2 commits into
Conversation
The per-commit publish left Version unstamped, so versioninfo.Load() picked up the workflow's throwaway v0.0.0 tag from Go build info and every runner/Buildkite helper reported "git-remote-entire/0.0.0". Stamp Version=0.0.0+<shortsha> so the User-Agent and git agent= capability identify the commit. Tagged releases are unchanged. Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
馃煝 Approval recommended
The narrowly scoped build change matches existing version handling and has no identified blocking issues.
0 open findings
What changed in this PR
Makes per-commit git-remote-entire builds identifiable by commit in version output and HTTP User-Agent, without changing tagged releases or artifact layout.
Changes:
- Stamps
versioninfo.Versionas0.0.0+{{.ShortCommit}}. - Updates configuration and workflow comments to explain the explicit stamp.
| File | Description |
|---|---|
.goreleaser.nonprod.yaml |
Adds the commit-bearing version stamp and explanatory comments. |
.github/鈥媤orkflows/鈥媝ublish-git-remote-entire.yml |
Updates comments describing the throwaway tag and version stamp. |
馃 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
Soph
approved these changes
Oct 10, 2026
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.
https://entire.io/gh/entireio/cli/trails/1518
Why
Every per-commit
git-remote-entirebuild (runner sandboxes, Buildkiteentire-core-authplugin) reportsgit-remote-entire/0.0.0as its User-Agent, so prod traffic from those helpers cannot be attributed to a commit (~40k spans/week in Datadog with that exact UA).Cause:
.goreleaser.nonprod.yamlleftversioninfo.Versionunstamped, expecting build info to supply the commit. Butversioninfo.resolvetakesinfo.Main.Versionwhen ldflags leave it atdev, and Go's build info reports the VCS tag on HEAD, which is the workflow's throwawayv0.0.0.What
versioninfo.Version=0.0.0+{{.ShortCommit}}in.goreleaser.nonprod.yaml. The+shasuffix is semver build metadata, stays a single token (it also rides in the gitagent=capability), andversioncheck.isDevBuildalready treats+metadataas a dev build.Build config only: no new runtime knobs or env vars in the helper, no change to artifact names or bucket layout, and tagged releases (
.goreleaser.yaml) are untouched. No Go code change: the explicit stamp makesresolve()return early, so build info is never consulted.Verification
Local build with the same ldflags shape:
Control build without the Version stamp picks up whatever tag is on HEAD (the bug):
goreleaser check -f .goreleaser.nonprod.yaml: validated.go test ./cmd/entire/cli/versioninfo/... ./cmd/git-remote-entire/...: ok;go vetclean.isDevBuild("0.0.0+abc1234") == true,isOutdated("0.0.0+abc1234", "0.11.3") == false.After merge: the next
publish-git-remote-entirerun should produce a helper whose--versionis0.0.0+<sha>, and new Datadog spans from re-pinned consumers should carrygit-remote-entire/0.0.0+<sha>.馃 Generated with Claude Code
Note
Low Risk
Build-time ldflags and workflow comments only; no runtime code or release pipeline changes beyond version string attribution.
Overview
Per-commit git-remote-entire builds from
.goreleaser.nonprod.yamlnow setversioninfo.Versionvia ldflags to0.0.0+{{.ShortCommit}}instead of leaving Version unstamped, so User-Agent and--versionidentify the commit instead of the workflow鈥檚 throwawayv0.0.0tag.Comments in publish-git-remote-entire and the nonprod GoReleaser config were updated to match that behavior. Tagged release config and artifact layout are unchanged.
Reviewed by Cursor Bugbot for commit 4ad477d. Configure here.