ComputerScienceHouse / ComputerScienceHouse/conditional

Add Healthcheck route

Open
#261 0 comments 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Python
Stars
12
Forks
39
Avg merge
1d 13h
Merged PRs (30d)
1

Description

This is a route that connects to the database, connects to ldap, and returns a json blob stating whether or not it can connect.

This should allow us to more reasonably monitor on whether or not conditional is in working order. The route should not be behind auth so datadog can hit it

How I want this to work
```
GET /api/v1/healthcheck
```
That would return 200 only when both ldap and the database connect correctly, and a 5XX range response when they don't. Different 5XX code for ldap down, sql down and both down. Return the json no matter what the status code is.
```json
{
"ldap": {
"status": true,
"server": "stone.csh.rit.edu"
},
"database": {
"status": true,
"server": "mysql.csh.rit.edu"
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by locating the existing Flask route structure and the LDAP and MySQL connection entry points, then implement the specified GET /api/v1/healthcheck behavior; done means unauthenticated JSON responses distinguish healthy, LDAP-only, database-only, and combined failures with the requested status ranges.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, mysql, python
Domain
api, backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.