-
Notifications
You must be signed in to change notification settings - Fork 467
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
Make resource HealthStatus computed from HealthReports #6368
Make resource HealthStatus computed from HealthReports #6368
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 |
@@ -62,12 +62,6 @@ internal static ResourceStateViewModel GetStateViewModel(ResourceViewModel resou | |||
icon = new Icons.Filled.Size16.Circle(); | |||
color = Color.Info; | |||
} | |||
else if (resource.HealthStatus is null) |
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.
This condition is redundant
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we want to remove 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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it, let the dashboard recalculate 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.
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. |
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 great
+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
HealthStatus
field of a resource no longer settable, and instead have it computed from theHealthReports
andState
fields.HealthStatus is computed as
Running
Fixes # (issue)
Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow