Skip to content

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

Description

@ogazboiz

Join the contributor Telegram: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

Operators need to know which version of the backend is running in each environment when triaging incidents. There is currently no /version endpoint, so they fall back to grepping logs or shelling into the container. A read-only endpoint exposing git_sha, build_time, and node_version is trivial to ship and immediately useful for runbooks and the staging smoke test.

Acceptance criteria

  • Add GET /version returning { gitSha, builtAt, nodeVersion, contracts: { loanManager, lendingPool, remittanceNft, multisigGovernance } }.
  • Read GIT_SHA and BUILD_TIME from environment variables, falling back to "unknown".
  • Wire those into the production backend/Dockerfile via ARG/ENV at build time.
  • Add a Jest test covering the response shape.

Files to touch

  • backend/src/app.ts
  • backend/Dockerfile
  • backend/src/__tests__/health.test.ts (or a new version.test.ts)
  • .github/workflows/deploy-staging.yml (pass GIT_SHA/BUILD_TIME build args)

Out of scope

  • Exposing the same on the frontend (/_status page is a separate issue).
  • Surfacing it in a UI banner.

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendIssues related to backend developmentgood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions