-
Notifications
You must be signed in to change notification settings - Fork 644
Add Azure App Configuration client integration #8459
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
Add Azure App Configuration client integration #8459
Conversation
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 pull request adds Azure App Configuration support to the Aspire framework by introducing a new component for managing connection settings, health checks, client registrations, and related extension methods.
- Adds configuration settings, health check, and component classes for Azure App Configuration.
- Provides extension methods for both keyed and unkeyed client registration.
- Updates playground projects to demonstrate usage.
Reviewed Changes
Copilot reviewed 17 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
AzureDataAppConfigurationSettings.cs | Introduces settings class implementing connection string parsing. |
AzureAppConfigurationHealthCheck.cs | Implements a health check for the ConfigurationClient. |
AssemblyInfo.cs | Registers configuration schemas and logging categories. |
AspireAppConfigurationExtensions.cs | Provides extension methods to register and configure the Azure App Configuration client. |
AppConfigurationComponent.cs | Implements the Azure component for client creation, health checks, and configuration binding. |
Playground/WorkerService/*.cs | Adds sample applications to demonstrate usage of the new component. |
Files not reviewed (12)
- Aspire.sln: Language not supported
- Directory.Packages.props: Language not supported
- playground/AzureAppConfiguration/AppHost/AppHost.csproj: Language not supported
- playground/AzureAppConfiguration/AppHost/Properties/launchSettings.json: Language not supported
- playground/AzureAppConfiguration/AppHost/appsettings.Development.json: Language not supported
- playground/AzureAppConfiguration/AppHost/appsettings.json: Language not supported
- playground/AzureAppConfiguration/WorkerService/Properties/launchSettings.json: Language not supported
- playground/AzureAppConfiguration/WorkerService/WorkerService.csproj: Language not supported
- playground/AzureAppConfiguration/WorkerService/appsettings.Development.json: Language not supported
- playground/AzureAppConfiguration/WorkerService/appsettings.json: Language not supported
- playground/Directory.Packages.props: Language not supported
- src/Components/Aspire.Azure.Data.AppConfiguration/Aspire.Azure.Data.AppConfiguration.csproj: Language not supported
src/Components/Aspire.Azure.Data.AppConfiguration/AzureAppConfigurationHealthCheck.cs
Outdated
Show resolved
Hide resolved
a792085
to
316eb9d
Compare
@dotnet-policy-service agree company="Microsoft" |
src/Components/Aspire.Azure.Data.AppConfiguration/AzureAppConfigurationHealthCheck.cs
Outdated
Show resolved
Hide resolved
src/Components/Aspire.Azure.Data.AppConfiguration/AzureAppConfigurationHealthCheck.cs
Outdated
Show resolved
Hide resolved
|
||
See the [Azure.Data.AppConfiguration documentation](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md) for examples on using the `ConfigurationClient`. | ||
|
||
## Configuration |
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.
Why do all examples use the SDK? Mixing the provider and SDK is confusing.
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.
I followed the key vault component readme
builder.Configuration.AddAzureAppConfiguration( | ||
"appconfig", | ||
configureOptions: options => { | ||
options.UseFeatureFlags(); | ||
options.ConfigureRefresh(refresh => | ||
{ | ||
refresh.RegisterAll(); | ||
}); | ||
builder.Services.AddSingleton(options.GetRefresher()); | ||
}); |
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.
Is this the minimal configuration. Why are there 3 layers of nested lambdas?
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.
This is not the minimal configuration. The minimal configuration is just:
builder.Configuration.AddAzureAppConfiguration("appconfig");
But to use advanced feature of App Config configuration provider (e.g. feature flag, dynamic refresh), you need to configure on AzureAppConfigurationOptions
BTW, I followed the existing pattern of AddAzureKeyVaultSecrets
.
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.
So this sample is just trying to show both calls but we dont expect people to do this right?
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.
So this sample is just trying to show both calls but we dont expect people to do this right?
If people want to use advanced features of Azure App Configuration. They should write code just like what I did in the example. We do expect people to do this if they want to use feature flag and dynamic refresh. But for simple configuration scenario, builder.Configuration.AddAzureAppConfiguration("appconfig");
is enough.
BTW, I am working on another PR: zhiyuanliang-ms#5
We decided to not implement anything for ConfigurationClient
from .net azure sdk. This PR should be deprecated.
The new API will be an extension method on IHostApplicationBuilder
.
builder.AddAzureAppConfiguration("appconfig");
Move to #8945 |
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #787
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):