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

Configurable and very basic health check endpoint #203

Merged
merged 7 commits into from
Jan 18, 2024

Conversation

nein09
Copy link
Contributor

@nein09 nein09 commented Jan 17, 2024

The primary purpose of this change is to address #131 .

It creates a simple endpoint, which only responds to GET requests. It responds with 200 OK if the server up and running. By default, the endpoint is at /health under the BasePath, but you can set an alternative path for it using the HealthEndpoint config key or the command-line flag -e.

There was discussion of multiple endpoints in the issue, but I don't think I have the necessary context to decide when startup versus readiness ones should return a 200. Also, it sounds like people may want to supply multiple alternate paths; I have left that for another day.

While I was in there, I

  • added some tests for functionality that @eldang added previously
  • Displayed an error message on the command line when running the tests with a database that failed to create the postgis extension (in my case, it was because my test user didn't have permission). I don't know how common this scenario is, but it happened to me because I was starting the project up from scratch to take a look at making this change in particular.

@pramsey pramsey merged commit 8ed8bf4 into CrunchyData:master Jan 18, 2024
3 checks passed
@pramsey
Copy link
Collaborator

pramsey commented Jan 18, 2024

Thank you, this passes for me, and is merged.

pramsey pushed a commit that referenced this pull request Jan 23, 2024
* Test show/hide preview functionality
* Simple health check endpoint and tests
---------
Co-authored-by: Eldan Goldenberg <eg@eldang.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants