Repository navigation
fix(aspire): cancel and join startup waits (#7277) - #7279
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Coordinate and validate startup waits src/TUnit.Aspire.Core/ResourceStartupWaiter.cs, tests/TUnit.Aspire.Tests/ResourceStartupWaiterTests.cs |
Adds a helper that races readiness waits against failure waits. Tests cover results, exceptions, cancellation, and cleanup behavior. |
Use coordinated waits during startup src/TUnit.Aspire.Core/AspireFixture.cs |
WaitForResourcesWithFailFastAsync delegates wait coordination to the helper. It retains readiness checks, ready-resource logging, and failure diagnostics. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant AspireFixture
participant ResourceStartupWaiter
participant ReadinessCallbacks
participant FailureWatchers
AspireFixture->>ResourceStartupWaiter: Call WaitAsync with readiness and failure waits
par Wait for readiness
ResourceStartupWaiter->>ReadinessCallbacks: Start readiness waits
and Wait for failure
ResourceStartupWaiter->>FailureWatchers: Start failure waits
end
ResourceStartupWaiter->>ReadinessCallbacks: Cancel and join pending waits
ResourceStartupWaiter->>FailureWatchers: Cancel and join pending waits
ResourceStartupWaiter-->>AspireFixture: Return failed resource name or null
Possibly related issues
- thomhurst/TUnit 7277: The issue describes cancelling and joining readiness and failure waits before startup exits. This change adds that coordination.
Merge Risk: 
Minimal · up to d26f3
-
This change makes Aspire startup cancel and join its pending resource waits instead of leaving them running. No concrete regression was identified, and tests cover the main outcomes and cleanup faults. It is low risk to merge.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "fix(aspire): cancel and join startup waits (
#7277)" matches the main change. ResourceStartupWaiter.WaitAsync now cancels and joins pending readiness and failure waits on every exit path, and AspireFixture delegates to it. The title names the fix, the affected area (aspire), and the behavior. The issue number in the title is a reference, not a problem. The objectives mention PR#7279while the title cites#7277; the objectives also describe the branch as issue-7277, so the mismatch is a minor metadata inconsistency and does not affect the title's relevance to the changeset.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 4 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit watched the resources wake,
While readiness raced failure’s track.
The waits were joined when races were done,
And logs marked each resource one by one.
The rabbit thumped, then hopped away,
As startup finished safely that day.
Comment @coderabbitai help to get the list of available commands.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryThe PR cancels and joins startup waits before reporting success, failure, or cancellation.
No actionable issues were found. Tests were reviewed but not run.
|
ReviewI read the diff but did not build the project or run the tests. The change moves the ready-versus-failure race out of
Non-blocking suggestions:
Looks good to merge. |
Summary by CodeRabbit