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
This problem has been introduced by this #887
Indeed if you look the code that has been changed in DaprSecretStoreConfigurationProvider.cs
foreach(var key in result.Keys){if(data.ContainsKey(key)){thrownew InvalidOperationException($"A duplicate key '{key}' was found in the secret store '{store}'. Please remove any duplicates from your secret store.");}
data.Add(normalizeKey? NormalizeKey(secretDescriptor.SecretName): secretDescriptor.SecretName, result[key]);}
The data.Add will throw error on the second key cause the secretDescriptor.SecretName will not change.
== APP == Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: pharma-common
== APP == at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
== APP == at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
== APP == at Dapr.Extensions.Configuration.DaprSecretStore.DaprSecretStoreConfigurationProvider.LoadAsync() in D:\GitPR\dotnet-sdk\src\Dapr.Extensions.Configuration\DaprSecretStoreConfigurationProvider.cs:line 232
If we back to the previous code in 1.12 and replace secretDescription.SecretName by key, then no more error.
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered:
Expected Behavior
Expected that the load of secret from a kubernetes/file store works without issue.
Actual Behavior
Since the v1.13, the extension to load secret is broken.
Steps to Reproduce the Problem
Create a simple secret store component
ex :
Configure the secrets.json like this
This problem has been introduced by this #887
Indeed if you look the code that has been changed in DaprSecretStoreConfigurationProvider.cs
The data.Add will throw error on the second key cause the secretDescriptor.SecretName will not change.
If we back to the previous code in 1.12 and replace secretDescription.SecretName by key, then no more error.
Release Note
RELEASE NOTE:
The text was updated successfully, but these errors were encountered: