You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we upgrade AppConfiguration package from 5.1.0 to 6.0.1 for ASP.NET Core app it starts working very unexpectedly in terms of Feature Flags refresh.
With feature flags setup like this:
Feature1 (label=null): true
Feature1 (label=env1): false
In env1, once the app starts all works correctly and we get FALSE, until the first refresh happens, then the non-labeled value overrides the labeled and since then we always get TRUE.
This does not happen on 5.1.0.
Setup code:
configurationBuilder.AddAzureAppConfiguration(options =>
{
options.Connect(appConfigUrl);
// Since Azure App Configuration API allows to load values filtering by 5 keys max,
// there are a bunch of configuration providers registered, every of it loads next portion of 5 values
foreach (var keysString in keysStrings)
{
options
.Select(keysString)
.Select(keysString, label);
}
options
.ConfigureKeyVault(vaultOptions =>
{
vaultOptions.SetCredential(credentials);
})
.ConfigureRefresh(refresh =>
{
refresh
.Register(sentinelKey, label, true)
.SetCacheExpiration(TimeSpan.FromSeconds(reloadInterval));
})
.UseFeatureFlags(featureFlagsOptions =>
{
featureFlagsOptions
.Select(KeyFilter.Any)
.Select(KeyFilter.Any, label);
featureFlagsOptions.CacheExpirationInterval = TimeSpan.FromSeconds(reloadInterval);
});
});
Also, worth mentioning that we call UseAzureAppConfiguration at the beginning of Startup.cs, so that we don't have issues like here: microsoft/FeatureManagement-Dotnet#201 (at some point we had, but fixed by moving it to top as well).
This happens with no interaction with Feature Flags on portal, so seems like no relations to #317
The text was updated successfully, but these errors were encountered:
Hi @danyltsiv, the bug in #317 shouldn't be exclusive to those who use the portal. From what you described, the pull request linked in that issue (#404) should resolve this issue as well. I can look more into why this happened while upgrading from 5.1.0 to see if there's anything you can do to work around this at the moment, but this should be fixed in the next major release.
The team couldn't come to an agreement on the approach in the original PR I mentioned, and the newest PR to add collection monitoring for key-values here should solve this. I can probably close #404 once the new PR I mentioned gets further along.
When we upgrade AppConfiguration package from 5.1.0 to 6.0.1 for ASP.NET Core app it starts working very unexpectedly in terms of Feature Flags refresh.
With feature flags setup like this:
Feature1 (label=null): true
Feature1 (label=env1): false
In env1, once the app starts all works correctly and we get FALSE, until the first refresh happens, then the non-labeled value overrides the labeled and since then we always get TRUE.
This does not happen on 5.1.0.
Setup code:
Also, worth mentioning that we call UseAzureAppConfiguration at the beginning of Startup.cs, so that we don't have issues like here: microsoft/FeatureManagement-Dotnet#201 (at some point we had, but fixed by moving it to top as well).
This happens with no interaction with Feature Flags on portal, so seems like no relations to #317
The text was updated successfully, but these errors were encountered: