focalboard
focalboard copied to clipboard
Feature Idea: Healthcheck w/ build metadata
Summary
We currently have /hello
which acts as a basic HTTP 200 healthcheck. Would like to create a new endpoint similar to mattermost-server
s /api/v4/system/ping
that adds additional build metadata e.g. commit hash, version, etc.
For acceptance criteria:
-
Create a new HTTP GET endpoint e.g.
ping
-
Response with a JSON body containing metadata keys and values e.g.
"version": "7.2", "commit": "abcd123", "build_number": "dev", "build_date": "n/a", "db_type": "sqlite", "db_version": "SQLite 3.37.0", "os_type": "darwin", "os_arch": "arm64", "sku": "personal_desktop"
-
The values would be populated from environment variables e.g. Makefile, GitHub Actions CI and data from the Golang binary
-
version
from hardcoded values -
commit
derived fromBUILD_HASH
-
build_date
andbuild_number
derived fromBUILD_DATE
andBUILD_NUMBER
environment variables -
os_type
&os_arch
perhaps fromOSTYPE
oruname
command -
db_type
&db_version
from config.json & database driver, respectively -
sku
by checkingFOCALBOARDSERVER_ARGS=--single-user
-
-
Add simple test(s) to verify endpoint
How important this is to me and why
Importance: Medium
Use cases:
- more robust debugging & observability when deploying releases
Additional context/similar features
mattermost-server
s ping
endpoint: https://api.mattermost.com/#tag/system/operation/GetPing
@Pinjasaur Do you have any proposals for this? Thanks! cc @sbishel
For anyone interested in working on this (for Hacktoberfest or not) we're happy to take a more iterative approach i.e. start with the more core metadata (version, commit, build info) and add more later.
👋 I'd like to give this a try
Thanks @mastersb! I've assigned this ticket to you.