Create health check endpoint #307

Manually merged
jgroman merged 1 commit from health-check into develop 2026-05-18 11:03:47 +00:00
Owner

This is to prevent livenessProbe spamming of index page

This is to prevent livenessProbe spamming of index page
kparal self-assigned this 2026-05-15 12:23:32 +00:00
Create health check endpoint
Some checks failed
Run tests and linters / test (pull_request) Successful in 3m4s
Run tests and linters / lint (pull_request) Failing after 2s
829188d4ff
This is to prevent livenessProbe spamming of index page
@ -282,0 +293,4 @@
return response
except Exception as e: # pylint: disable=broad-except
app.logger.error('Health check failed: %s', e)
abort(500)
Author
Owner

This only aborts the current health check connection, not the whole app, right?

This only aborts the current health check connection, not the whole app, right?
Owner

I guess the 500 implies that it's specific to the request.

edit: per https://flask.palletsprojects.com/en/stable/errorhandling/#custom-error-pages and the docs it links to, yeah, I think this is fine.

I guess the `500` implies that it's specific to the request. edit: per https://flask.palletsprojects.com/en/stable/errorhandling/#custom-error-pages and the docs it links to, yeah, I think this is fine.
kparal marked this conversation as resolved
Author
Owner

@jgroman This is one of the reverts I did during Forgejo PR, I'm putting it back.

I guess maybe adding a unit test for this might be good?

@jgroman This is one of the reverts I did during Forgejo PR, I'm putting it back. I guess maybe adding a unit test for this might be good?
Add tests for health check
Some checks failed
Run tests and linters / test (pull_request) Successful in 2m51s
Run tests and linters / lint (pull_request) Failing after 2s
72bea4ccda
Owner

@kparal wrote in #307 (comment):

I guess maybe adding a unit test for this might be good?

Added tests. The original code LGTM.

@kparal wrote in https://forge.fedoraproject.org/quality/blockerbugs/pulls/307#issuecomment-712411: > I guess maybe adding a unit test for this might be good? Added tests. The original code LGTM.
kparal force-pushed health-check from 72bea4ccda
Some checks failed
Run tests and linters / test (pull_request) Successful in 2m51s
Run tests and linters / lint (pull_request) Failing after 2s
to c2c9d51a59
Some checks failed
Run tests and linters / test (pull_request) Successful in 2m47s
Run tests and linters / lint (pull_request) Failing after 2s
2026-05-18 11:00:42 +00:00
Compare
jgroman manually merged commit c2c9d51a59 into develop 2026-05-18 11:03:47 +00:00
Author
Owner

Thanks, merged

Thanks, merged
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
quality/blockerbugs!307
No description provided.