Skip to content
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

Make more things async #2533

Merged
merged 7 commits into from
Feb 29, 2024
Merged

Make more things async #2533

merged 7 commits into from
Feb 29, 2024

Conversation

davidfowl
Copy link
Member

@davidfowl davidfowl commented Feb 29, 2024

This is preparation for making it possible for resources to wait for a longer time for things like connection strings to be resolved. e.g. in the case of azure provisioning.

  • Environment callbacks
  • Added GetConnectionStringAsync
  • Updated all of the tests
Microsoft Reviewers: Open in CodeFlow

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Feb 29, 2024
- Environment callbacks
- Added GetConnectionStringAsync
- Updated all of the tests
- Renamed ExecutableArgsCallbackAnnotation to CommandLineArgsCallbackAnnotation
- Made everything async
@davidfowl
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@davidfowl davidfowl enabled auto-merge (squash) February 29, 2024 05:07
@@ -17,14 +17,27 @@ public static class CustomResourceExtensions
/// <param name="builder">The resource builder.</param>
/// <param name="initialSnapshotFactory">The factory to create the initial <see cref="CustomResourceSnapshot"/> for this resource.</param>
/// <returns>The resource builder.</returns>
public static IResourceBuilder<TResource> WithResourceUpdates<TResource>(this IResourceBuilder<TResource> builder, Func<CustomResourceSnapshot>? initialSnapshotFactory = null)
public static IResourceBuilder<TResource> WithResourceUpdates<TResource>(this IResourceBuilder<TResource> builder, Func<CancellationToken, ValueTask<CustomResourceSnapshot>>? initialSnapshotFactory = null)
Copy link
Member

Choose a reason for hiding this comment

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

Having a context here would reduce the chance of needing something extra in the future causing a breaking change. Up to you.

@davidfowl davidfowl enabled auto-merge (squash) February 29, 2024 06:40
@davidfowl davidfowl merged commit ac95db5 into main Feb 29, 2024
8 checks passed
@davidfowl davidfowl deleted the davidfowl/async-app-model branch February 29, 2024 06:45
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants