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

Provide health checks to allow docker to wait until the emulator is ready to receive requests #24

Open
remoba opened this issue Nov 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@remoba
Copy link

remoba commented Nov 20, 2024

Similar to the issue with the event hub emulator Azure/azure-event-hubs-emulator-installer#38 except here it's even more prominent since there seems to be a hard coded 15 seconds wait for Sql to become ready (instead of a Sql health check that could determine that)

Copy pasting here:

We're using docker compose to run the emulator. Sometimes after the docker image is up, it may take a few seconds for it to become available to accept requests. In other emulators we usually circumvent this by using health checks. For example, in Azurite we can do something like this the workaround suggested here Azure/Azurite#1666 (comment). However, this is not possible with the emulator as the image doesn't seem to contain an actual shell (sh / bash)

Describe the solution you'd like
Ideally a health check in the image itself, or some other best practice to follow

Describe alternatives you've considered

Thread sleep arbitrarily from the consuming side - not great since we have to copy paste this solution everywhere and the time to wait may vary
Retry from the consuming side until the image becomes ready - not great because it's harder to isolate image startup times and possible errors from the tests'

@Saglodha
Copy link
Collaborator

Thanks for reaching out to us @remoba. As mentioned in other issue, we'll investigate and would share progress updates on this thread.

@Saglodha
Copy link
Collaborator

Hi @remoba,

Happy to share that the latest version for service bus emulator supports health check API. It can be accessed at http://localhost:5300/health. You can find detailed release notes here - https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-emulator-whats-new#latest-version-112

@kf6kjg
Copy link

kf6kjg commented Mar 12, 2025

As noted in another ticket, this is good, but not quite enough to satisfy Docker Compose healthchecks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants