Skip to content

Track migration from ParameterResource.Value to IValueProvider.GetValueAsync and eventing API due to changes in dotnet/aspire#10354 #751

Closed

Description

@davidfowl

Background

The recent changes in dotnet/aspire#10354 impact how parameters are accessed in the CommunityToolkit Aspire libraries. Specifically, blocking calls to ParameterResource.Value must be replaced with the asynchronous IValueProvider.GetValueAsync API (this was implicit before 9.4 but will be a public API afterwards).

Problem

  • Any blocking calls to ParameterResource.Value, especially in asynchronous pipeline methods like AfterEndpointsAllocatedAsync, risk deadlocking or blocking app host startup.
  • AfterEndpointsAllocatedAsync is slated for deprecation in Aspire 9.4.
  • There is an urgent need to refactor toolkit code to
    • Eliminate blocking calls
    • Move off AfterEndpointsAllocatedAsync and instead use the eventing API for endpoint resolution (ResourceEndpointsAllocated)

Action Items

  • Audit CommunityToolkit Aspire code for blocking calls to ParameterResource.Value
  • Replace blocking calls with IValueProvider.GetValueAsync OR use the ParameterResource instance directly in environment variables (this will defer resolution)
  • Identify and refactor usages of AfterEndpointsAllocatedAsync to use the eventing API
  • Test all affected APIs (e.g., DBGate) to ensure they function correctly with the new async pattern

References


If any APIs or code paths are found that are not compatible with the new async pattern or eventing API, please document them here and propose migration steps.

Activity

  1. added theissue type on Jul 13, 2025
  2. added
    bug
    breaking-change
    on Jul 13, 2025
  3. davidfowl commented on Jul 13, 2025

    @davidfowl
    ContributorAuthor
  4. removed
    breaking-change
    on Jul 13, 2025
  5. aaronpowell commented on Jul 28, 2025

    @aaronpowell
    Member

    Let's set Copilot to work on this 😝

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions