bcgov / bcgov/wps

Improve health check

Open
#825 0 comments 0 reactions 0 assignees View on GitHub
4Refinement Task
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**Describe the task**
Improve health check

**Acceptance Criteria**
- [ ] Health check does db connection check.
- [ ] Separate the openshift healthcheck from the Patroni health check.
- [ ] Check that cronjobs etc. are running ok.

**Additional context**
- There is scope for other health checks - e.g.: reporting about cronjobs, etc: check if model runs have been processed etc.
- Current health check asks Openshift about patroni, but doesn't actually check if it can connect. The site could be configured with incorrect database settings, and would continue to report that it's up.
- Currently we're using the health endpoint for uptime robot to report on the database being up, and for openshift to see if the system is healthy.
- Maybe have /health/patroni , /health/api , health/something
- Currently, if a model run completely fails to get downloaded, we'd never know.

Contributor guide

Open the contributing guide

Research direction

Start at the current health endpoint and trace how it queries OpenShift and Patroni. Clarify the proposed /health/patroni and /health/api entry points, then map the database, cronjob, and model-run checks to the acceptance criteria. Done means the checks report the relevant failures separately and accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, postgresql, python
Domain
api, backend, databases, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.