-
Couldn't load subscription status.
- Fork 710
Refactor Devcontainer port forwarding logic to use a channel for updates and improve asynchronous processing. #11657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11657Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11657" |
There was a problem hiding this comment.
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 refactors the Devcontainer port forwarding logic to support incremental port updates rather than batch processing all endpoints upfront. The main change introduces a channel-based asynchronous processing system that can handle port forwards as they become available.
- Replaces synchronous batch processing with asynchronous channel-based updates
- Switches from
AfterEndpointsAllocatedAsyncto event-driven processing viaResourceEndpointsAllocatedEvent - Adds proper resource disposal and background task management
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| DevcontainerSettingsWriter.cs | Implements channel-based processing, adds IDisposable, and refactors from batch to incremental port handling |
| DevcontainerPortForwardingLifecycleHook.cs | Changes from lifecycle hook to event subscription model for processing individual resource endpoints |
…tes and improve asynchronous processing. - Don't assume we have all of the endpoints up front. Support incrementally updating settings and appending ports to forward. Fixes #11654
5301289 to
fc3009b
Compare
|
/backport to release/9.5 |
|
Started backporting to release/9.5: https://github.com/dotnet/aspire/actions/runs/18119393675 |
Description
Don't assume we have all of the endpoints up front. Support incrementally updating settings and appending ports to forward.
Fixes #11654
Checklist