Build resource logging into Aspire.Hosting#5878
Conversation
|
What extra logs would this capture that were being missed earlier? |
The tests using WaitFor sometimes hang and get collect no output because the ApplicationExecutor.StartAsync won't return until all of the services have been spun up completely. I think we'll need to change this behavior in general, but this also makes pushing logs through the ILogger a first class feature. |
|
LGTM |
eerhardt
left a comment
There was a problem hiding this comment.
LGTM. Might want to consider writing a test that ensures it works correctly.
|
Failure looks relevant: |
|
yea been debugging it |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I need to chase down the race or bug. |
|
Is this making it for 9.0.0? |
|
Highly, unlikely, unless I figure out the bug tonight 😄. There's a single test failuree |
dc10464 to
26a5864
Compare
- Logging resource state needs to be added before the DcpHostedService is added so that it can subscribe to the resource notification service and capture logs. - Added EnableResourceLogging to DistributedApplicationOptions - Removed all of the code duplication and instead set the flag in places where it was being used.
e4913b5 to
0018bb5
Compare
Description
Fixes #6791
PS: I found this while debugging #5821
Checklist
<remarks />and<code />elements on your triple slash comments?