obs: Dockerfile ldflags + smoke-buildinfo target (track 1/8)#5
Merged
Conversation
…ha (track 1/8) - Dockerfile: ARG GIT_SHA / BUILD_TIME / VERSION (prod stage only — the debug stage shares the same builder layer so it gets the same ldflags for free), passed into `go build -ldflags -X instant.dev/common/buildinfo.X=...`. - Makefile: docker-build now forwards --build-arg from `make` vars. - New `make smoke-buildinfo` target verifies the ldflag path. Companion change in common (PR #2 adds the buildinfo package). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
6 tasks
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.
Summary
Track 1 of 8 in the observability rollout. Wires the provisioner's Docker build to inject
instant.dev/common/buildinfovars at link time:ARG GIT_SHA / BUILD_TIME / VERSIONon the shared builder stage (so bothprodanddebugfinal targets get the same linked-in metadata), passed intogo build -ldflags -Xso the resulting binary stamps its own commit on every log line and /healthz response.docker-buildnow forwards--build-argfrommakevars.make smoke-buildinfotarget buildscmd/smoke-buildinfowith override values and asserts they appear at runtime — a CI regression gate for the ldflag path.Depends on InstaNode-dev/common#2 (adds the buildinfo package).
Test plan
go build ./...green.go test ./...green (server/interceptor/storage suites pass).make smoke-buildinfoprintssmoke-buildinfo: OK (GitSHA=smoke-sha BuildTime=smoke-time Version=smoke-ver).Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com