-
Notifications
You must be signed in to change notification settings - Fork 5
Description
When loading feature flags from multiple AppConfigurations using the provider, entries are overwritten in the ConfigurationManager. As a result, only the last ConfigMap entries remain, and previously defined feature flags are lost.
We have the following setup:
Using the provider, we generate ConfigMaps and Secrets from 4 different AppConfigurations.
When working with feature flags, we ran into an issue: if we load them into the ConfigurationManager via AddJsonFile, entries get "overwritten" — since they are stored by index in the ConfigurationManager underlying providers.
For example, if we have the following entries in two ConfigMaps:
"feature_management": {
"feature_flags": [
{
"conditions": {
"client_filters": []
},
"enabled": true,
"id": "T1"
},
{
"conditions": {
"client_filters": []
},
"enabled": true,
"id": "T2"
}
]
}"feature_management": {
"feature_flags": [
{
"conditions": {
"client_filters": []
},
"enabled": true,
"id": "T3"
}
]
}The result in the feature manager will be only T3 and T2 — T1 is no longer present.
Our current workaround is to keep all feature flags in a single AppConfiguration.
I’m not sure if this could be called an issue and if so where it should be addressed, since from our perspective three components are involved:
- the appconfiguration kubernetes provider
- the feature manager
- the configuration manager
From what we can see, the problem already occurs in the ConfigurationManager, as it overwrites entries. We also already found this issue: dotnet/runtime#118204 but not sure if this addresses the same behavior.
Is there a possible solution for this in the provider?