Conversation
karolz-ms
reviewed
Mar 8, 2024
src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs
Outdated
Show resolved
Hide resolved
2a87dd9 to
8e6ca7f
Compare
9a83a02 to
f59608b
Compare
- Moved all of the DCP logic calling into k8s APIs into the ApplicationExecutor. - Added an overload of WatchAsync that watches all resources. This is what the dashboard uses. - Watch logs as soon as they become available an push them through the ResourceLoggerService API. This makes them avaialble to anyone looking for logs. - Support sending updates based on IResource and a unique resource id. This is how we can support unique snapshots for replicas. - Introduce a "Hidden" state to allow hiding resources from the dashboard views. Use this to hide app model resources after DCP has loaded the resource. - Watching resource state changes are global. This makes it possible to listen to changes to replicas since they aren't directly represented in the model, but they are still associated with an IResource. - Publish the initial state of any resource that has a ResourceSnapshot annotation.
f59608b to
c693f3b
Compare
mitchdenny
approved these changes
Mar 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal here is to hand a single way to handle resource notification and logs by using the interface we introduced for custom resources everywhere. The dashboard data model now depends on these services and nothing DCP specific. The god class
ApplicationExecutornow watches for changes after initializing services.ResourceLoggerService API. This makes them avaialble to anyone looking
for logs.
Fixes #2548
Microsoft Reviewers: Open in CodeFlow