-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: do not fail DERP healthcheck if WebSocket is used #10714
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
Conversation
| type Report struct { | ||
| Healthy bool `json:"healthy"` | ||
| Healthy bool `json:"healthy"` | ||
| Warnings []string `json:"warnings"` |
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.
Should this be a map[string][]string so that it's easier to identify the source of the warnings?
That way we don't need to worry about doing fmt.Sprintf("[%s] %s", prefix, warning") all the time.
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.
It might also make easier for the UI to display them separately.
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 don't have a strong preference here, but []string is convenient as it is defined the same way for every section. Frontend can just render all warnings as is. If you find it useful, I can just adjust the implementation though.
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.
It might also make easier for the UI to display them separately.
My main concern is consistency with other warnings []string fields, but I don't mind changing it.
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'm not sure what would be easier for the UI, to be honest. Maybe we just ship and iterate?
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.
Agree 👍
Fixes: #9470
Replaces: #10620
This PR extends the
/api/v2/debug/healthAPI response to includewarning []stringfield. Also, Coder will not report "unhealthy" status if there are troubles with Websockets.