Skip to content

[docs] Note that resource logs flush before terminal notifications - #1435

Merged
David Pine (IEvangelist) merged 1 commit into
release/13.5from
docs/flush-logs-before-terminal-notifications-e14d84617148d01c
Aug 7, 2026
Merged

[docs] Note that resource logs flush before terminal notifications#1435
David Pine (IEvangelist) merged 1 commit into
release/13.5from
docs/flush-logs-before-terminal-notifications-e14d84617148d01c

Conversation

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Documents changes from microsoft/aspire#18539

@davidfowl

Targeting release/13.5 based on the source PR milestone 13.5.

Why

The source PR flushes captured DCP stdout/stderr logs to resource-log subscribers before publishing terminal (Exited/FailedToStart) resource-state notifications. Previously, fast-failing containers/executables could reach a terminal state before their logs were forwarded, making DistributedApplicationTestingBuilder-based test failures hard to diagnose because WaitForResourceAsync could return before the relevant logs were visible.

The existing testing/accessing-resources.mdx page documents WaitForResourceAsync but did not mention this log-flush guarantee, which is directly relevant to test authors diagnosing resource failures.

What changed

  • Added a tip callout to src/frontend/src/content/docs/testing/accessing-resources.mdx under "Ensure resources are available", explaining that resource stdout/stderr logs are flushed before terminal state notifications are published, so test code awaiting WaitForResourceAsync with a terminal state can rely on that output being present in captured host logs.

Files changed

  • src/frontend/src/content/docs/testing/accessing-resources.mdx (updated)

Generated by PR Documentation Check · auto · 38.3 AIC · ⌖ 7.29 AIC · ⊞ 17.8K ·

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot aspire-repo-bot Bot added the docs-from-code Copilot initiated issue from dotnet/aspire repo label Aug 7, 2026
@IEvangelist
David Pine (IEvangelist) marked this pull request as ready for review August 7, 2026 04:05
Copilot AI lite review requested due to automatic review settings August 7, 2026 04:05

@IEvangelist David Pine (IEvangelist) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated against microsoft/aspire#18539. The new tip accurately documents the log-flush ordering guarantee for terminal resource notifications.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the testing documentation to describe the ordering guarantee around forwarding resource stdout/stderr logs relative to publishing terminal resource-state notifications, so WaitForResourceAsync-based tests can surface diagnostic output for fast-failing resources.

Changes:

  • Adds a tip callout under “Ensure resources are available” explaining that resource logs are flushed before terminal (Exited/FailedToStart) notifications are published.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +50 to +56
If a resource fails during startup (for example, a container exits
immediately or an executable can't be found), Aspire flushes any captured
resource logs before it publishes the terminal (`Exited` or `FailedToStart`)
state notification. That means test code awaiting `WaitForResourceAsync`
with a terminal state can rely on the resource's stdout/stderr output being
present in the captured host logs at the point the wait completes, which
makes fast-failing resources easier to diagnose.
@aspire-repo-bot

Copy link
Copy Markdown
Contributor Author

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1435. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1435 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

@IEvangelist
David Pine (IEvangelist) merged commit 446aefb into release/13.5 Aug 7, 2026
11 of 12 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the docs/flush-logs-before-terminal-notifications-e14d84617148d01c branch August 7, 2026 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-from-code Copilot initiated issue from dotnet/aspire repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants