Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health check endpoint #4371

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Health check endpoint #4371

merged 1 commit into from
Oct 27, 2023

Conversation

axelstudios
Copy link
Member

@axelstudios axelstudios commented Oct 27, 2023

Any background context you want to provide?

Tools like Docker can better integrate with containers if they offer a method for checking the health status of the container and its dependencies.

What's this PR do?

Adds a new, undocumented API endpoint that does not require authentication to check the status of the various systems necessary for SEED to function properly

  • Endpoint: /api/health_check/
  • 200 response code if everything is healthy, 418 otherwise

Example response:

HTTP 200

{
  "status": "healthy",
  "postgres": "success",
  "celery": "success",
  "redis": "success"
}

How should this be manually tested?

  1. Run SEED, check that the status is healthy
  2. Stop celery, check that status has updated
  3. Restart celery, stop redis. Check that both celery and redis are unhealthy
  4. Restart redis, stop postgres. Check that only postgres is unhealthy
  5. Restart postgres, check that the status is healthy

@axelstudios axelstudios added the Feature Add this label to new features. This will be reflected in the change log when generated. label Oct 27, 2023
@SEED-platform SEED-platform deleted a comment from github-actions bot Oct 27, 2023
Copy link
Contributor

@kflemin kflemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♥️418

@axelstudios axelstudios merged commit b0f04e7 into develop Oct 27, 2023
7 of 8 checks passed
@axelstudios axelstudios deleted the task/health-check branch October 27, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Add this label to new features. This will be reflected in the change log when generated.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants