feat: expose running CalVer version via API #126
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#126
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem
There's no way to determine which CalVer version is running in production. The container pulls
:latest(soon:production), anddocker inspectonly shows the tag name, not the CalVer version it was built from.Proposed Approach
Embed the CalVer version at build time and expose it at runtime. Options (not mutually exclusive):
/api/v3/versionor include it in the/healthresponseorg.opencontainers.image.versionlabel to the imageThe CI workflow already extracts the version in the
Extract version from tagstep — it just needs to be passed through to the build.Why
We had to cross-reference container creation timestamps with git tag dates to guess the running version. This should be a single API call or
docker inspect.Opened PR #127: #127
All three approaches from the issue are implemented:
ARG BUILD_VERSION=devin Dockerfile baked intoENV APP_VERSION— CI passes the git tag value viabuild-argsLABEL org.opencontainers.image.version=$BUILD_VERSION— visible viadocker inspectwithout running the container/healthendpoint:GET /healthreturns{"status": "ok", "version": "2026.4.1"}— also upgrades the Dockerfile HEALTHCHECK from the SQL-hitting/api/v3/currentto the lightweight/health