Move resource creation in ResourceReadyEvent event #7211
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I am testing the new
ResourceReadyEvent
. However there is a limitation in this case, I would still prefer the previous solution. Resource creation (db, containers) needs to happen when the emulator is "ready". But dependents should not use cosmosdb until the resources are created.The previous solution was relying on a custom healthcheck to create and assess the db/containers are created and/or ready. This new solution is hitting a deadlock, that is the
ResourceReadyEvent
is triggered once the resource si healthy, but if the healthcheck ensure the db/containers are available then it can't work sinceResourceReadyEvent
is doing it. So right now no db/containers are passed in the healthcheck, so it will only ensure the service is available beforeResourceReadyEvent
can create the db/containers.Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):