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 #38

Open
remoba opened this issue Nov 7, 2024 · 1 comment

Comments

@remoba
Copy link

remoba commented Nov 7, 2024

Is your feature request related to a problem? Please describe.
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'
@remoba remoba changed the title Support health checks to allow docker to wait until the emulator is ready to receive requests Prove health checks to allow docker to wait until the emulator is ready to receive requests Nov 7, 2024
@remoba remoba changed the title Prove health checks to allow docker to wait until the emulator is ready to receive requests Provide health checks to allow docker to wait until the emulator is ready to receive requests Nov 7, 2024
@remoba
Copy link
Author

remoba commented Nov 11, 2024

Note that we have also observed that the event hub emulator deletes all containers from the Azurite storage account, so if our tests also leverage Azurite they now need to wait arbitrarily before beginning, otherwise the emulator deletes the containers they use mid-run

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

No branches or pull requests

1 participant