[release/8.2] Fix dashboard log parsing in host #5426
Merged
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.
Backport of #5425 to release/8.2
/cc @JamesNK
Fixes regression from #5357
There is code in the Aspire host that listens to dashboard logs. It expects JSON logs from the dashboard, which are parsed and possibly written to the host. That allows for dashboard errors to be visible in the host console.
The previous PR changes Aspire to add a timestamp to executable log content, including the dashboard. Parsing timestamp prefixed messages as JSON fails.
Unfortunatly there were no unit tests here and there is no indication when running the host that there are errors when parsing the logs.
Customer Impact
Customer won't see errors from the dashboard in the Aspire host console.
Testing
Unit tests and manual testing.
Before (no error):
After (error in console):
Risk
Low. Product change is to trim a timestamp (if present) from content before deserializing it.
Regression?
Yes
Microsoft Reviewers: Open in CodeFlow