Azure / AppConfiguration-DotnetProvider

The .NET Standard configuration provider for Azure App Configuration
https://github.com/Azure/AppConfiguration
MIT License
77 stars 34 forks source link

Add StartupOptions for time-based retries on startup #488

Closed amerjusupovic closed 8 months ago

amerjusupovic commented 8 months ago

StartupOptions and the Timeout property

This PR adds the new Startup property to AzureAppConfigurationOptions. You can set the Startup.Timeout property equal to a TimeSpan that represents how long the provider should continue retrying the store and replicas passed to the provider before failing.

Example usage:

config.AddAzureAppConfiguration(options =>
{
   // . . .
    options.ConfigureStartupOptions(startupOptions =>
    {
        startupOptions.Timeout = TimeSpan.FromMinutes(5);
    });
});
zhenlan commented 8 months ago
                if (_mappedData == null)

Is this only triggered during refresh? If so, it means the startup is already done (though initial configuration load had failed). We shouldn't use the startup logic here, because if anything fails here it will be tried again in the next refresh. #Closed


Refers to: src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationProvider.cs:211 in c8ada35. [](commit_id = c8ada35504eb98d64cbb06ed008a2354f58eadf7, deletion_comment = False)

jimmyca15 commented 8 months ago

pr example usage needs an update.

jimmyca15 commented 8 months ago

@amerjusupovic will you be updating the target branch to preview?