azure / appconfiguration Goto Github PK
View Code? Open in Web Editor NEWQuestions, feedback and samples for Azure App Configuration service
License: MIT License
Questions, feedback and samples for Azure App Configuration service
License: MIT License
Our current JSON Parser allows importing invalid Json.
Valid JSON:
{ "key": "value" }
Invalid JSON that we still imports successfully:
{ "key" : value }
{ "key" : }
{ key }
{ : }
We should add a validator before our JSON parser starts parsing.
On the quickstart-java-spring-app, "Configure your app with App Configuration Hubs dependency" section, step 6, bootstrap.yaml
is written as:
spring:
cloud: <- Before the cloud, indention should exist
azure:
Not sure whether it's by design, but properties
can be also used in Spring application or Spring Boot application, prefer to use Java(Spring).
When user creates a new KV on Portal, after he/she types in an existing label, the user must select the label again with mouse, otherwise the label would revert to Empty by default, hence causing user miss-config potentially.
Imaging the user types in "L1" and click "Apply" immediately, we would create a new KV with empty label.
Search by key should be not case-sensitive. Assumption should be that when a search by a pattern is performed it's likely because one doesn't remember the exact key or casing.
Currently the feature loads 500 records. The PgDn keyboard button jumps about 10 records so in order to move to the end of the loaded records you would have to hit the button 50 times.
Just as a reference, for Amazon orders you need to hit the PgDn button 3 times to get to last loaded record.
Consul is a great open source, platform agnostic offering that is popular with many folks. In the same vein as the Cassandra API capability provided by Cosmos DB it would be great if App Configuration provided a Consul compatible API so existing (or new) app components could leverage Consul clients but benefit from the backend power of App Configuration.
We can suggest users that connecting through managed identity to ACH is supported if their application is deployed to other managed identity supported Azure services such as App Service, VM, Azure Container Instance etc. We can include a link to the doc that discusses our managed identity support in more detail.
It would be helpful if we could report on the last time a given key / keys were used and from what user / ip address. Is there any way to accomplish this?
We should provide a way to cancel the import/export operations.
Currently importing takes 1min for every 500 KVs, which is a bit long for people in front of monitors. Potential performance improve?
Experiments:
10 -> 2s
100 -> 10s
200 -> 23s
500 -> 1min
1000 -> 2min
Under section No.5, Endpoint=<service_endpoint>;Id=<hub_id>;Secret=<secret_key>=
, should remove last =
.
Under section No.6, change Data from an App Configuration Hub
to Data from an App Configuration Hubs
Some of the key-values in my configuration store's have multiple labels. For example I have the key-value "abc" which exists with an empty label and also with a label named "someLabel".
I wanted to use the .NET Core config provider to query the key-values with an empty label. For some reason I was expecting key-values with a null label to always take priority. What I found was that when I accessed configuration["abc"] it returned the value of the abc key-value in the "someLabel" label.
Then I tried to figure out how to query only empty label key-values with the provider but it wasn't as easy as I would have liked. I need to call
builder.AddAzconfig(o => {
o.ConnectWithManagedIdentity("https://mystore.azconfig.io");
o.Use("*", "\0"); // This selects key-values with the empty label.
});
I believe we need to make the empty label filter a constant within the provider and perhaps add documentation to the method which describes that this constant should be used to select only key-values that have the empty label.
In the Quickstarts sections there are five pages each for different frameworks. At the end of every page there is a link to msi integration tutorial, which only shows how to do that for DotNet Core provider. https://review.docs.microsoft.com/en-us/azure/app-configuration-hubs/quickstart-dotnet-app?branch=pr-en-us-63864#next-steps
There should be different pages for DotNet Full framework builder and Java spring.
Also in https://review.docs.microsoft.com/en-us/azure/app-configuration-hubs/integrate-azure-managed-service-identity?branch=pr-en-us-63864#configure-your-app-to-use-a-managed-identity since ConnectWithManagedIdentity method will take an endpoint as parameter, we should change the example setting name from ConnectionStrings:AzureAppConfig to Endpoint:AzureAppConfig for instance.
If not, are there plans to add this functionality?
I got the error below when watching (spring.cloud.azure.config.stores[0].watched-key
) for changes of a not-yet-created key.
java.lang.IllegalStateException: Failed to load keys from Azure Config Service. With status code: 416, response: HttpResponseProxy{HTTP/1.1 416 Range Not Satisfiable
All 3 scenarios below should be considered as valid
On portal, when I was doing key value comparison, I was confused with time option since there is no text explaining what the field is. I would recommend adding text such as "at time" above the time field so that new user could figure out what the field represents for.
The preferred date time feature of the AzureAppConfiguration configuration provider formats date times using the current thread culture and tries to add this formatted date to an HTTP header. This causes cultures such as japanese that use non-ASCII characters to represent the current day to throw an HttpRequestException
("Request headers must contain only ASCII characters."
)
private static void Repro()
{
var builder = new ConfigurationBuilder();
CultureInfo cu = new CultureInfo("ja-JP");
Thread.CurrentThread.CurrentCulture = cu;
builder.AddAzureAppConfiguration(o =>
o.Connect(connectionString)
.Use("*", preferredDateTime: new DateTimeOffset(2019, 2, 28, 19, 0, 0, TimeSpan.FromHours(9))) // This selects key-values with the empty label.);
);
IConfiguration config = builder.Build();
}
//
// There is a bug with preferredDateTime and certain cultures such as Japanese
// The work-around is to set the current thread's culture to english when building the configuration
private static void WorkAround()
{
var builder = new ConfigurationBuilder();
builder.AddAzureAppConfiguration(o =>
o.Connect(connectionString)
.Use("*", preferredDateTime: new DateTimeOffset(2019, 2, 28, 19, 0, 0, TimeSpan.FromHours(9))) // This selects key-values with the empty label.);
);
//
// Cache current culture to restore it
var oldCulture = Thread.CurrentThread.CurrentCulture;
//
// Use an english culture to work around bug in preferred datetime and non-english cultures
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
//
// Build the configuration, this causes the error in affected cultures
IConfiguration config = builder.Build();
//
// Restore the previous culture
Thread.CurrentThread.CurrentCulture = oldCulture;
}
Following the instructions in https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app, when doing:
dotnet add package Microsoft.Extensions.Configuration.AzureAppConfiguration
I get the following error:
info : Adding PackageReference for package 'Microsoft.Extensions.Configuration.AzureAppConfiguration' into project 'D:\repos\work\work.csproj'.
log : Restoring packages for D:\repos\work\work.csproj...
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.extensions.configuration.azureappconfiguration/index.json
error: Unable to find a stable package Microsoft.Extensions.Configuration.AzureAppConfiguration with version
error: - Found 1 version(s) in nuget.org [ Nearest version: 1.0.0-preview-007830001 ]
error: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
error: - Found 0 version(s) in CliFallbackFolder
error: Package 'Microsoft.Extensions.Configuration.AzureAppConfiguration' is incompatible with 'all' frameworks in project 'D:\repos\work\work.csproj'.
My dotnet version is 2.1.504
The way to make it work is to explicitly add the version that is defined in NuGet:
dotnet add package Microsoft.Extensions.Configuration.AzureAppConfiguration --version 1.0.0-preview-007830001
While the package is in preview, there could be a side note in the documentation explaining that the version needs to be explicitly set and that they can get it from NuGet directly, or something like that.
The current version of asp.net builder (1.0.0-preview10124) has a dependency of Microsoft.Configuration.ConfigurationBuilder.Base(>=1.0.0-preview10124)
But when we built the project, it will throw an ConfigurationErrorException complaining about the ConfigurationBuilder.Base version to be at least 2.0.0. Also there is no 1.0.0-preview10124 but 2.0.0-preview10124 version for ConfigurationBuilder.Base, so maybe there is a typo about the version number in the builder?
Also we should remove the dependencies requirement for Azconfig.Client and Azconfig.ManagedIdentityConnector since we won't release these two packages.
Contents from doc (https://review.docs.microsoft.com/en-us/azure/app-configuration-hubs/integrate-azure-managed-service-identity?branch=pr-en-us-63864#configure-your-app-to-use-a-managed-identity)
"Add a managed identity to your App Service
To set up a managed identity in the portal, you will first create an application as normal and then enable the feature.
1 Create an app in the Azure portal as you normally would. Navigate to it in the portal.
2 Scroll down to the Settings group in the left navigation and select Identity.
Some suggestions,
When creating a .Net Console App, we should choose Visual C# > Windows Desktop instead of Visual C# > Windows Classic Desktop in visual studio 2017.
Also we should add comments that the builder requires .Net framework version 4.7.1 and up.
There is a typo for the type in configBuilder, it should be
<add name="MyConfigStore" mode="Greedy" connectionString="${ConnectionString}" type="Microsoft.Configuration.ConfigurationBuilders.AzconfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azconfig" />
Also we may consider adding the configurations for environment variable builder as examples.
I tried to list revisions of a configuration store with the CLI and I happened to type in the wrong name for my configuration hub. The CLI replied with the following error:
Cannot find connection-string of the configuration hub jimmyca-wcus.
I found this slightly odd because it makes it seem like the CLI is having trouble accessing my hub, when in reality the hub I specified did not exist. I would have expected a message such as
Cannot find the app configuration hub 'jimmyca-wcus'.
.
If I add two entries with the same Key but different value and Label, I am not able to access these duplicate Keys from the .Net Core App/Azure Function.
What is the use of Label? Is this similar to Version?
If that is the case, still shouldn't all the Keys with different values still be accessible?
When the import operation starts, the import/export blade is disabled for the duration of the operation. However, if you go to another blade and then back the import/export blade is enabled and you can perform another import operation. This seems a bug to me, if we are disabling the blade we should not allow for another operation. Also, this is likely to be a source of race conditions.
After user specified a filter, if he wants to remove filters and see current config, he must refresh the entire Web page, or click another section in Portal and come back again:
It would be great if we have a "clear filter" button that removes filters, so that user could check current config easily without refreshing the whole page.
We have been using VSTS Variables heavily to store configuration for some of our microservices.
There is a huge limitation that when a configuration is incorrect, we would have to redeploy the microservice, since VSTS variables are tightly coupled with deployment.
We see a huge breakthrough with App Configuration. How do we manage configuration across different environments like QA/UAT/Production?
Also with App Configuration in place, what is the future of VSTS variables?
Following the instructions in https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app, when doing step #3 of Connect to app configuration store
, it will be good to also point out that the user needs to add the corresponding using statement in the file, for the application to compile.
By just following the instructions, the user will get the error:
Program.cs(9,31): error CS0246: The type or namespace name 'ConfigurationBuilder' could not be found (are you missing a using directive or an assembly reference?) [...]
Build FAILED.
Program.cs(9,31): error CS0246: The type or namespace name 'ConfigurationBuilder' could not be found (are you missing a using directive or an assembly reference?) [...]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:02.20
According to the extensions installed in the code editor the user could see this, although being explicit about it might be better.
The fact that we need to use "version" to explain what a label is seems to indicate it should be called version.
Label is quite confusing, it seems more like "tag" โฆ observe the docs
In the meantime, for consistency, the docs should read "Versioning with labels" (we fixed this for the portal extension in the Azure Gallery).
On the quickstart-java-spring-app, it's written as search "App Configuration Hub", but configuration service is not found when I am searching with this key word.
Currently, keys would get overwritten w/o a prompt.
You can import a full set of keys but you can only export specific keys, this is limited by the label filter which is populated with a default value (cannot be empty).
We are building many microservices that might depend on Service Registry based Key Value Store. We originally thought of using either Consul from HashiCorp or use VSTS as the store since it has release variables.
However We are now thinking of using AppConfiguration for that purpose.,
Since this is going to be central configuration store, we do not want our services go kaboom when the AppConfiguration goes down for any odd reason.
I do see SetOfflineCache method. I am not sure if it is for this purpose of caching the values as a backup?
Are there any examples for SetOfflineCache?
Please update the doc: https://github.com/Azure/Azconfig-DotnetProvider#examples
Regardless of the value of optional, exceptions are swallowed.
<add name="MyConfigStore" mode="Greedy" labelFilter="l1*" optional="false" connectionString="wrongstring" type="Microsoft.Configuration.ConfigurationBuilders.AzconfigBuilder, Microsoft.Configuration.ConfigurationBuilders.Azconfig" />
For example, when we use a wrong connection string, or in labelFilter it contains "*" or "," which we shouldn't support, even if we set optional to be false it still swallow all exceptions.
Also based on doc https://github.com/aspnet/MicrosoftConfigurationBuilders#optional the default value of optional is true, should we change it to false as in DotNet Core provider?
How does one delete config keys in bulk? Or clear/reset the entire config store?
I tried importing a blank file but it did not work.
Can we have a documented way to do this either via portal or REST API?
When user compare two configuration hubs, the page would list ALL key-values, which has two problems when KV number > 500 :
user has to scroll to very bottom to see every different key-values:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.