Make resource HealthStatus computed from HealthReports#6368
Make resource HealthStatus computed from HealthReports#6368adamint merged 43 commits intodotnet:mainfrom
Conversation
I was just thinking about this! The property does not appear when the resource has a health report with a null value. We encode that assumption in |
| icon = new Icons.Filled.Size16.Circle(); | ||
| color = Color.Info; | ||
| } | ||
| else if (resource.HealthStatus is null) |
There was a problem hiding this comment.
This condition is redundant
JamesNK
left a comment
There was a problem hiding this comment.
Looking pretty good. Needs tests.
|
| @@ -210,6 +210,7 @@ message Resource { | |||
|
|
|||
| // The aggregate health state of the resource. Generally reflects data from health_reports, but may differ. | |||
| optional HealthStatus health_status = 16; | |||
There was a problem hiding this comment.
Was there offline discussion about adding this back? I'm not against it, just want to make sure that was an agreed decision.
There was a problem hiding this comment.
I know I said before I didn't want it, but sending the calculated value does reduce duplication. It lets the dashboard be more dumb and accept whatever status the service decides 😄
I haven't got a hard opinion either way, but the current code looks fine to me.
There was a problem hiding this comment.
@davidfowl I had re-added it to the proto to do what james said - avoid re-calculating the status in the dashboard and avoid duplication
There was a problem hiding this comment.
Remove it, let the dashboard recalculate it.
There was a problem hiding this comment.
Re-removed :) is everything else ok?
|
Looks good. I have some questions, nits and changes to the sandbox. |
|
Is this now in a merge-able state? |
|
@adamint I suggest you do a squash and a manual backport. This has 36 commits. |
+1. If you don't know how to squash, squash merge in GH does it automatically. Then just create a new branch from release/9.0 and cherry pick the squashed commit. |
…interactions of multiple reports
…heck runs, even if the overall status has not
|
There was a health check scenario that has never been accounted for -
I have updated the sandbox and ResourceHealthCheckService to account for this. |
|
Good catch @adamint ! |
* Make resource HealthStatus computed from HealthReports * Update health reports when they have changed but the status has not --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> (cherry picked from commit a4ef97a)
* Make resource HealthStatus computed from HealthReports * Update health reports when they have changed but the status has not --------- Co-authored-by: Adam Ratzman <adamratzman@microsoft.com> Co-authored-by: Mitch Denny <midenn@microsoft.com> (cherry picked from commit a4ef97a)
#### AI description (iteration 1) #### PR Classification Merge branch `release/9.0` into `internal/release/9.0` to integrate recent changes and address specific work items. #### PR Summary This pull request integrates changes from the `release/9.0` branch into `internal/release/9.0`, addressing several work items related to Azure storage and network isolation. - `/tests/Aspire.Hosting.Azure.Tests/AzureContainerAppsTests.cs`: Added a new test `ConfigureCustomDomainsMutatesIngress` to validate custom domain configuration for Azure Container Apps. - `/src/Aspire.Hosting.Azure.AppContainers/ContainerAppExtensions.cs`: Introduced a new extension method `ConfigureCustomDomain` to simplify the process of assigning custom domains to Azure Container Apps. Related work items: dotnet#6368, dotnet#6391, dotnet#6433, dotnet#6458, dotnet#6467






Description
The purpose of this PR is to make the
HealthStatusfield of a resource no longer settable, and instead have it computed from theHealthReportsandStatefields.HealthStatus is computed as
RunningFixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow