-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: healthcheck not waiting for all services to start #1419
Conversation
5505436
to
9b6b17e
Compare
@quest-bot loot #1357 |
Quest PR submitted!@tarunrajput, you are attempting to solve the issue and loot this Quest. Will you be successful? Questions? Check out the docs. |
On it! |
@tarunrajput there's something wrong with the project, I'm having trouble running |
Signed-off-by: tarunrajput <[email protected]>
9b6b17e
to
2c8c734
Compare
@mojafa, could you pls check now? Screen.Recording.2024-12-06.at.3.42.46.PM.1.mov |
On it now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func HealthCheck(ctx *gin.Context) { | ||
cfg, err := server.GetConfig() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the direction you were going for here but, because all of these components are separated, we shouldn't mix them together here.
The headscale port and local builder registry port can be checked in the server command directly instead of the API here.
Furthermore, the local builder registry might not even be active (because the user disabled it) so you need to take that into account.
@@ -13,6 +13,8 @@ import ( | |||
log "github.com/sirupsen/logrus" | |||
) | |||
|
|||
var AllProviderRegistered = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of this, I suggest that the provider manager has an IsInitialized
function that will return true if it is initialized.
Then you can expose an endpoint in the provider controller that will return the "health" of the providers
Hi @Tpuljak, I am having a tough time with my mental health right now and don't think I'll be able to complete this. therefore, I am closing this PR. |
@tarunrajput I am very sorry to hear that. Everyone from the Daytona team wishes you the best. Mental health should be everyone's top priority. |
fix daytona healthcheck not waiting for all services to start
Description
This PR updates the Daytona health check to ensure all services are ready before the command exits.
Related Issue(s)
closes #1357