-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard should request log streams only when the user gestures to d…
…isplay them (#3235) (#3343) Change the AppHost to only subscribe to DCP's logs when there is a subscriber for the logs. Fix #2789 * Show logs * Remove the "StreamingLogger" because that causes subsequent subscribers to not see what was already written. Fix duplicate logs issue by clearing out the backlog when the last subscriber leaves. * Fix a concurrency issue with the backlog. Ensure the backlog is only snap shotted after subscribing to the log. Fix existing tests for new functionality and add an additional test. * PR feedback Only clear the backlog on containers and executables. * PR feedback. Move lock out of async iterator. * Clean up code. - Remove count and instead check if the delegate is null to indicate whether there are subscribers or not. - Remove the separate IAsyncEnumerable classes and just use `async IAsyncEnumerable` methods. * Fix a race at startup when logs aren't available. Employ a 2nd loop that listens for both "has subscribers" and "logs available". * Simplify ResourceNotificationService.WatchAsync. * Fix test build * Address PR feedback - Set SingleReader=true on the logInformationChannel. - Add comment and assert that LogsAvailable can only turn true and can't go back to false. --------- Co-authored-by: David Fowler <[email protected]>
- Loading branch information
Showing
6 changed files
with
379 additions
and
113 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.