Disable default timeout for HTTP commands - #18986
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18986Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18986" |
There was a problem hiding this comment.
Pull request overview
This PR allows unnamed HTTP resource commands to run beyond the default 100-second HttpClient timeout while retaining cancellation support and preserving configured timeouts for named clients.
Changes:
- Sets the timeout to infinite for HTTP commands without
HttpClientName. - Adds regression coverage for unnamed and named client timeout behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Hosting/ResourceBuilderExtensions.cs |
Disables the default timeout for unnamed HTTP command clients. |
tests/Aspire.Hosting.Tests/WithHttpCommandTests.cs |
Verifies unnamed clients have no timeout and named clients retain configured timeouts. |
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Tests selector (audit mode)The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement. 48 / 100 test projects · 4 jobs, from 3 changed files. Selected test projects (48 / 100)
Selected jobs (4)
How these were chosen — grouped by what changed
🔧 show 43
🧪 📦 affected project Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
This comment has been minimized.
This comment has been minimized.
|
The CI build failed due to test failure(s) that appear unrelated to the PR changes. These may be flaky tests. Suspected flaky test(s):
Suggested actions:
You can re-run the failed jobs from the workflow run page. |
|
📝 Documentation has been drafted in microsoft/aspire.dev#1515 targeting Added a new HTTP command timeouts section to
Note This draft PR needs human review before merging. |
Description
HTTP resource commands that run for more than 100 seconds currently fail with the default
HttpClient.Timeout, even though command execution already supports explicit cancellation from the dashboard.This change removes the implicit timeout for HTTP commands that do not specify
HttpCommandOptions.HttpClientName. Those commands now run until they complete or the command cancellation token is canceled. Named HTTP clients continue to honor their configured timeout.User-facing usage
Long-running HTTP commands no longer require a named client solely to exceed 100 seconds:
Applications that need a finite timeout can continue to configure a named client and set
HttpCommandOptions.HttpClientName.Validation:
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?