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
Loads secrets in parallel #944
Conversation
src/Configuration/Config.AzureKeyVault/test/AzureKeyVaultConfigurationTest.cs
Outdated
Show resolved
Hide resolved
This is technically a breaking change. We now require thread safety from customer provided On the other hand it's inlikely that /// <summary>
/// The <see cref="IKeyVaultSecretManager"/> instance used to control secret loading.
/// </summary>
public interface IKeyVaultSecretManager
{
/// <summary>
/// Checks if <see cref="SecretItem"/> value should be retrieved.
/// </summary>
/// <param name="secret">The <see cref="SecretItem"/> instance.</param>
/// <returns><code>true</code> is secrets value should be loaded, otherwise <code>false</code>.</returns>
bool Load(SecretItem secret);
/// <summary>
/// Maps secret to a configuration key.
/// </summary>
/// <param name="secret">The <see cref="SecretBundle"/> instance.</param>
/// <returns>Configuration key name to store secret value.</returns>
string GetKey(SecretBundle secret);
} |
Out of curiosity, with this change, what is the time delta in the scenario of ~79 secrets being loaded? |
As far as breaking changes go, I agree with the assessment. Can we update the doc comments for the affected types/methods to indicate the thread safety requirements? |
src/Configuration/Config.AzureKeyVault/src/AzureKeyVaultConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Configuration/Config.AzureKeyVault/src/AzureKeyVaultConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Configuration/Config.AzureKeyVault/src/AzureKeyVaultConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Configuration/Config.AzureKeyVault/src/AzureKeyVaultConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
src/Configuration/Config.AzureKeyVault/src/AzureKeyVaultConfigurationProvider.cs
Outdated
Show resolved
Hide resolved
Not a breaking change anymore. All |
@Eilon our connection to KeyVault is pretty good so on my machine with 100 secrets load time went from 11 to 7 sec. I would imagine much better results on machines with slower access to keyvault. |
@gfoidl thank you for the review! |
Fixes: #910