Skip to content

feat(#881): add GET /version endpoint with build metadata and contrac…#977

Open
Anuoluwapo25 wants to merge 2 commits into
LabsCrypt:mainfrom
B-Hands:feat/issue-881-version-endpoint
Open

feat(#881): add GET /version endpoint with build metadata and contrac…#977
Anuoluwapo25 wants to merge 2 commits into
LabsCrypt:mainfrom
B-Hands:feat/issue-881-version-endpoint

Conversation

@Anuoluwapo25
Copy link
Copy Markdown
Contributor

…t IDs

  • GET /version returns { gitSha, builtAt, nodeVersion, contracts } where contracts exposes all four on-chain contract IDs for runbooks
  • GIT_SHA and BUILD_TIME read from env; fall back to 'unknown' so the endpoint is always available even in local dev without build args
  • Dockerfile: add ARG GIT_SHA / BUILD_TIME baked into ENV at build time
  • deploy-staging.yml: pass GIT_SHA=github.sha and BUILD_TIME from head_commit.timestamp as Docker build-args on every staging push
  • Add version.test.ts covering: response shape, env-var fallbacks, contract ID reflection, and nodeVersion correctness
    closes [Backend] Add GET /version endpoint exposing build SHA, build time, and contract IDs #881

…d contract IDs

- GET /version returns { gitSha, builtAt, nodeVersion, contracts }
  where contracts exposes all four on-chain contract IDs for runbooks
- GIT_SHA and BUILD_TIME read from env; fall back to 'unknown' so the
  endpoint is always available even in local dev without build args
- Dockerfile: add ARG GIT_SHA / BUILD_TIME baked into ENV at build time
- deploy-staging.yml: pass GIT_SHA=github.sha and BUILD_TIME from
  head_commit.timestamp as Docker build-args on every staging push
- Add version.test.ts covering: response shape, env-var fallbacks,
  contract ID reflection, and nodeVersion correctness
@ogazboiz
Copy link
Copy Markdown
Contributor

ogazboiz commented Jun 1, 2026

hey, please rebase to pick up recent main changes — your CI is failing on issues that main has since resolved.

git fetch upstream
git rebase upstream/main
git push --force-with-lease

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] Add GET /version endpoint exposing build SHA, build time, and contract IDs

2 participants