-
Notifications
You must be signed in to change notification settings - Fork 35
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 connect Cdn API #601
base: preview
Are you sure you want to change the base?
add connect Cdn API #601
Conversation
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/EmptyTokenCredential.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationOptions.cs
Outdated
Show resolved
Hide resolved
…zureAppConfigurationOptions.cs Co-authored-by: Avani Gupta <[email protected]>
…/AppConfiguration-DotnetProvider into user/samisadfa/connect-cdn
/// Connect the provider to CDN endpoint. | ||
/// </summary> | ||
/// <param name="cdnEndpoint">The endpoint of the CDN instance to connect to.</param> | ||
public AzureAppConfigurationOptions ConnectCdn(Uri cdnEndpoint) |
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.
We allow users to specify multiple Connect
calls and the last one always wins.
We are preserving that behavior with ConnectCdn
, but with CDN endpoint involved, it's not that intuitive. I think we should throw if Connect and ConnectCdn are invoked together. This should not be allowed:
options.Connect(appConfigEndpoint, tokenCredential)
.ConnectCdn(cdnEndpoint)
@zhenlan @drago-draganov what do you think?
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.
What is "not that intuitive" ?
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.
Connect
is loading from AppConfig service, but ConnectCdn
is loading from CDN service. With a setup like above, I would expect my provider to load data from both endpoints.
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.
Agree with Avani's suggestion - the Connect and ConnectCdn shouldn't be allowed to be used at the same time.
Even if there is such a scenario, users can create two separate configuration builders.
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.
Done
…nstance(s) used by the provider (#598) * Introduced a new `AzureAppConfigurationClientFactory` class to handle the creation of `ConfigurationClient` instances * remove clients dictionary since we will not have hits and clients are already stored in ConfigurationClientManager * revert * add license + remove unused usings * ran dotnet format * add capability of fallback to different stores * add explicit type * address comments * remove scheme validation --------- Co-authored-by: Sami Sadfa <[email protected]>
* add IsAzureAppConfigurationSource * nit: format --------- Co-authored-by: Sami Sadfa <[email protected]>
…d when the `optional` parameter is set to true (#599) * update comment * address comment --------- Co-authored-by: Sami Sadfa <[email protected]>
Co-authored-by: Sami Sadfa <[email protected]>
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationOptions.cs
Outdated
Show resolved
Hide resolved
Note: Correlation-Context header should contain a special tag when |
src/Microsoft.Extensions.Configuration.AzureAppConfiguration/CdnApiVersionPolicy.cs
Show resolved
Hide resolved
@@ -0,0 +1,72 @@ | |||
using Azure.Data.AppConfiguration; |
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.
nit: add mit license comment on new files
No description provided.