-
Notifications
You must be signed in to change notification settings - Fork 609
Update health check to ensure blob containers created at right time #9159
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
base: main
Are you sure you want to change the base?
Conversation
Hmm, we had this debate when @sebastienros did the database creation and I thought we decided to use the ResourceReady event (which runs after health checks). |
For databases, do we: aspire/src/Aspire.Hosting.SqlServer/SqlServerBuilderExtensions.cs Lines 58 to 77 in 88ff939
aspire/src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs Lines 66 to 90 in 88ff939
In general, I dislike using health checks to mutate state. They should just be used to check health, not make something "healthy". |
I am not super fond of this result, but I couldn't find a way to add a healthcheck for individual blob containers. Any suggestions? |
Resolves #9139
Resolves #9145
I removed
ResourceReadyEvent
handler, and moved blob container creation logic into the BlobStorage health check. This way, once we connected to the storage emulator and have the service client, we can ensure the requested blob containers are created.Kudos to @mitchdenny for giving me some ideas.