[FR] Add HEALTHCHECK to Dockerfile #149
Labels
core broker
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
The team has de-prioritized this and could use your help!
Is your feature request related to a problem? Please describe.
When using the Docker image in automated testing, after we start the CSB and then run tests (with the
eden
OSBAPI client), we see:This is because after startup of the CSB, there is a period where the broker is still reading files and not yet ready to serve requests, and there's no good way to know when the CSB is actually ready.
Describe the solution you'd like
The Dockerfile should include a
HEALTHCHECK
directive so that scripts and Makefiles can explicitly wait for the container to be healthy before proceeding.Describe alternatives you've considered
We previously added in a delay to wait at least X seconds after starting the image before proceeding to run tests, where X was picked by trial and error. This felt like a pretty poor workaround, given that the performance between the GitHub Actions runner and our local machines varies widely, and we didn't want to inject any more delay than was necessary into our manual iteration time.
Additional Context
I worked out what the healthcheck should be over here (though you may want to change the interval and retry count). With the healthcheck in place, here's a one-liner that waits for the container to be healthy.
Priority
Low
Priority Context
I'd like to remove as much complexity from my Makefile as possible, and having a built-in healthcheck will benefit other users of the CSB in various contexts. However, I'm clearly able to work around the problem now by supplying the
docker run
arguments.Platform
N/A
Applicable Services
N/A
The text was updated successfully, but these errors were encountered: