Forward build provenance args to local compose builds#130
Merged
Conversation
GET /v1/version reports the commit/tag/build-time the backend was built from. The Dockerfile already consumes GIT_COMMIT / GIT_TAG / BUILD_TIME into SHEAF_* env, and CI passes them on every ghcr image build - so the official images already carry provenance. A local `docker compose build` left them null, though, because the app service's build args didn't forward them. The app service now accepts GIT_COMMIT / GIT_TAG / BUILD_TIME from the host environment (compose can't run git itself, so the host populates them), with a documented one-liner in SELFHOSTING.md. Unset values stay empty, so nothing changes for anyone who doesn't opt in.
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.
Closes the one gap in build provenance.
GET /v1/versionreports the commit/tag/build-time the backend was built from - useful for confirming which commit a deployed instance is actually running.The Dockerfile already consumes
GIT_COMMIT/GIT_TAG/BUILD_TIMEintoSHEAF_*env, andci.ymlpasses them on every ghcr image build, so the official images already carry provenance. The gap was a localdocker compose build: the app service'sargsblock forwardedINCLUDE_DEV_TOOLSand the pip-mirror vars but not the git ones, so a compose-built image reported null commit/tag/time.The app service now forwards
GIT_COMMIT/GIT_TAG/BUILD_TIMEfrom the host environment (compose can't run git itself; the host populates them). SELFHOSTING.md documents the one-liner:Unset values stay empty, so nothing changes for anyone who doesn't opt in. Verified the env-to-arg substitution with
docker compose config; the arg-to-ENV-to-/v1/version chain is unchanged from what CI already exercises.Docs/infra only - no Python, no migration.