-
Notifications
You must be signed in to change notification settings - Fork 416
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
Show aggregate health status in the dashboard #5770
Conversation
@@ -170,6 +170,16 @@ message Resource { | |||
|
|||
// The set of volumes mounted to the resource. Only applies to containers. | |||
repeated Volume volumes = 15; | |||
|
|||
// The aggregate health state of the resource | |||
optional HealthStateKind HealthState = 16; |
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.
Since this part is public API, I think we should do the right thing here and have complete health state information. In other words, have a list of the different health checks and what there status is.
e.g.
repeated HealthCheck health_checks = 16;
message HealthCheck {
string name = 1;
HealthStateKind state = 2;
}
It will be simple to use this information to figure out the aggregate health state. And in the future it will be easier to add more detailed information about the health status, such as a list in the resource details, or a new view.
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.
Do you want the dashboard to compute the aggregate? Don't you want to avoid that computation for the overview? That requires the dashboard to look at health changes per resource and track the aggregate.
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 see a problem with the dashboard calculating it. When the dashboard builds the ResourceViewModel it can loop over the health checks and set a property.
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 think we want a single source of truth. The resource server in the case of the apphost needs the aggregate as well (its how WaitFor works), so it makes sense to avoid recomputing it unnecessarily. I think we should send the aggregate and defer the health check detail for when we invent UI to show them.
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.
Looks good to me.
src/Aspire.Dashboard/Components/ResourcesGridColumns/StateColumnDisplay.razor
Outdated
Show resolved
Hide resolved
I pulled the branch to try it out. My initial reaction when I see this in the dashboard is why do some resources say they're ready, and others don't? IMO, don't display |
So we only display No ready and never ready. |
Yes. I think it is cleaner UI, and IMO it's less confusing. As always, if someone wants more details then they can open the details view. |
src/Aspire.Dashboard/Components/ResourcesGridColumns/StateColumnDisplay.razor
Show resolved
Hide resolved
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.
LGTM in the resource service and dashboard layers
…enable showing it in the dashboard. - Don't show healthy/unhealthy, just use the heath state to show readiness in the dashboard UX. - Use an internal annotation to keep track of DCP resource names for state updates. - Publish health state updates to instances as well as the main resource.
b24e9c2
to
fd2112b
Compare
@Alirexaa the pgweb test failed here:
I think we need a better wait for and potentially more retries. |
I will check. |
Description
Added the aggregated health state to the resource server protocol to enable showing it in the dashboard.
Contributes to #5569
healthstate.mp4
Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow