fix(ci): wire the computed release version into the built binaries #55
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/version-wiring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The containerized builds report
gllm unknownon the index page (and in/statusand thegllm_server_infometric). Two independent breaks:.dockerignoreexcludes.git(deliberately, for stale-artifact hygiene), sogo buildinside the container has no repo to stampvcs.revisionfrom, andBuildVersion()fell through to"unknown".The fix threads the version through:
internal/engine/status.go: link-timebuildVersionvar;BuildVersion()prefers it, keeping the VCS-revision fallback for localmake build.Dockerfile/Dockerfile.cuda:ARG VERSION=injected via-ldflags -X.build-push.yaml: both image builds pass--build-arg VERSION=${{ steps.tags.outputs.version }}.Makefile:image/image-cudapassgit describeso local images report provenance instead of "unknown".Both CPU and CUDA images get the plain version (no
-cudasuffix) -- the backend is already a separate/statusfield and the flavor lives in the image tag.Dockerfile.cuda-prereleaseis untouched (build-only canary, never pushed); the 13.4 GA probe inherits the emptyARGdefault harmlessly.Verified:
go vet/go build/engine tests pass; a scratch test run with the-Xflag reports the injected version and without it falls back as before.🤖 Generated with Claude Code
Automated review by pr-reviewer v0.37.0 | Safety Check | Claude Sonnet 5 | tracking id
r-61e18c-61f25dThis is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — Straightforward, low-risk build/CI wiring fix with backward-compatible fallback logic and no security or breaking-change concerns.
The change is a straightforward, low-risk CI/build-wiring fix:
internal/engine/status.go: adds a package-levelbuildVersionvar, overridable via-ldflags -X, with fallback to existing VCS-based logic. Logic is correct and backward compatible (empty string falls through to old behavior).ARG VERSION=with empty default is safe — harmless if unset, matches stated intent.build-push.yaml: adds--build-arg VERSION=...to both CPU and CUDA build invocations, sourced from the already-computedsteps.tags.outputs.version. No secrets involved, straightforward plumbing.Makefile: addsVERSION ?= $(shell git describe ...)with sane default and passes it through to local image builds.No security concerns (no secrets, no injection vectors — version strings come from git tags/CI, not user input). No accidentally committed files. No breaking changes: the fallback path is preserved, so binaries built without the new ldflag continue to behave as before. Diff is small and matches the PR description precisely; nothing looks tacked on or suspicious.
Minor note: no new tests added for the status.go change, but the logic is trivial (string override with fallback) and this is acknowledged in the PR's own context notes.