Skip to content

5.0.0-preview

Pre-release
Pre-release

Choose a tag to compare

@avanigupta avanigupta released this 16 Dec 21:51
731feec

Microsoft.Extensions.Configuration.AzureAppConfiguration 5.0.0-preview - December 16, 2021

Breaking Changes:

  • Removed all offline caching capabilities. #135

  • Added support for parsing and using sync-token from push notifications received from Event Grid. Using sync-token ensures that users get the latest key-values from App Configuration on any subsequent request. The following new APIs were added:

    EventGridEventExtensions.TryCreatePushNotification(this EventGridEvent eventGridEvent, out PushNotification pushNotification)
    IConfigurationRefresher.ProcessPushNotification(PushNotification pushNotification, TimeSpan? maxDelay = null)

    To use sync-token in a push refresh enabled application, the existing SetDirty() call can be replaced by the following code. Depending on the event handler you're using, you may need to convert the received event to an EventGridEvent object. For example, if you are using Service Bus as the event handler, the code will look like this:

    serviceBusClient.RegisterMessageHandler(
                   handler: (message, cancellationToken) =>
                   {
                      EventGridEvent eventGridEvent = EventGridEvent.Parse(BinaryData.FromBytes(message.Body));
    
                      if (eventGridEvent.TryCreatePushNotification(out PushNotification pushNotification))
                      {
                         _refresher.ProcessPushNotification(pushNotification, maxDelay); 
                      }
    
                      return Task.CompletedTask;
                   },
                   exceptionReceivedHandler: (exceptionargs) =>
                   {
                         Console.WriteLine($"{exceptionargs.Exception}");
                         return Task.CompletedTask;
                   });

    The next call to RefreshAsync() or TryRefreshAsync() will get the latest key-values from your App Config store. #278

  • Added support for CancellationToken during refresh operations. The following APIs were updated in IConfigurationRefresher interface: #281

    Task RefreshAsync(CancellationToken cancellationToken = default);
    Task<bool> TryRefreshAsync(CancellationToken cancellationToken = default);
  • Added support for logging errors during refresh operations. #273

  • Ensured that Key Vault secret refresh interval cannot be less than 1 second. #284

  • Upgraded Microsoft.Extensions packages from version 2.1.1 to 3.1.18. #272

Microsoft.Azure.AppConfiguration.AspNetCore 5.0.0-preview - December 16, 2021

  • Updated Microsoft.Extensions.Configuration.AzureAppConfiguration reference to 5.0.0-preview. See the release notes for more information on the changes.

Microsoft.Azure.AppConfiguration.Functions.Worker 5.0.0-preview - December 16, 2021

  • Added middleware to support dynamic configuration in Azure Functions running in an isolated process. Refer to Azure Functions documentation for more details about running C# Azure Functions in an isolated process. #287