Skip to content

v8.0.0

Compare
Choose a tag to compare
@adams85 adams85 released this 26 May 18:58
· 30 commits to master since this release
775aa17

Please note that this version comes with several breaking changes, so you may need to adjust your code when upgrading, especially if you're using deprecated APIs or a custom logger and/or cache implementation. You can find the detailed list of breaking changes below.

New features and improvements:

  • Complete overhaul of SDK logging:
    • Simplify the logger interface (IConfigCatLogger, formerly ILogger) to make it easier to write custom implementations/adapters to logger frameworks.
    • Enable structured logging (for a demonstration of this concept, see this sample app).
    • Include event IDs in log messages to make identification of log events easier.
    • Revise log messages and make them consistent across the ConfigCat SDKs.
  • Revise caching of downloaded config data:
    • Change the cache interface (IConfigCatCache) to get and set the cache payload as a plain string to make it easier to write custom implementations by removing the burden of data serialization from implementers.
    • Use a standardized config cache key generation algorithm and cache payload format to allow shared caches to be used by SDKs of different platforms. (The specification was slightly modified after this release, so support for standardized caching is actually available in v8.1.0.)
  • Enable cancellation of async operations.
  • Add nullable reference type annotations. (This may be a source breaking change if your project is configured to use NRTs and your code tries to pass nullable values in parameters marked as non-nullable to the SDK methods. Such errors, however, mean that your code is incorrect, you are just notified of the issues at compile-time instead of run-time.)
  • Enable Source Link.
  • Revise XML documentation.
  • Minor performance improvements.

Bug fixes:

  • Fix checks which ensure that AutoPoll.PollInterval, AutoPoll.MaxInitWaitTime and LazyLoad.CacheTimeToLive settings are in the valid range. (Also, make infinite init wait possible in the case of Auto Polling.)
  • Fix bug causing repeated refresh in the case of flag overrides configured to use a simplified config file data source.
  • Fix potential version conflicts caused by the System.Net.Http package reference in .NET Framework targets (net45 and net461) by replacing the package reference with an assembly reference to the built-in version (v4.0.0), which is shipped as a part of the framework.

Breaking changes (listed in the order of expected impact):

  • Remove all public constructors of ConfigCatClient and builder-style instantiation (ConfigCatClientBuilder). Alternative: ConfigCatClient.Get. Also removes the related configuration infrastructure (ConfigurationBase, ConfigurationBuilderBase and their subclasses).
  • Remove the AutoPoll.OnConfigurationChanged event. Alternative: ConfigCatClientOptions.ConfigChanged.
  • Change the type of the NewConfig property from ProjectConfig to IConfig in ConfigChangedEventArgs.
  • Remove the ILogger interface. Alternative: IConfigCatLogger.
  • Remove the IConfigCache interface. Alternative: IConfigCatCache.
  • Remove the GetVariationId/GetVariationIdAsync and GetAllVariationIds/GetAllVariationIdsAsync methods from IConfigCatClient/ConfigCatClient. Alternative: GetValueDetails/GetValueDetailsAsync and GetAllValueDetails/GetAllValueDetailsAsync.
  • Slightly change the behavior of GetValue/GetValuesAsync and GetValueDetails/GetValuesDetailsAsync to fail early with exception when these methods are called with invalid parameters:
    • ArgumentNullException when key is null.
    • ArgumentException when key is empty.
    • ArgumentException when T is not a supported type (string, bool, int, long, double or object - both nullable and non-nullable).
    • OperationCanceledException when cancellationToken is canceled during the operation (async methods only).
  • The ConfigCatClientOptions.Logger and ConfigCatClientOptions.PollingMode are no longer initialized to a default instance but use null to specify that the default implementation should be used.
  • Remove the ProjectConfig, RolloutRule and RolloutPercentageItem classes from the public API.
  • Change the type of the MatchedEvaluationRule to ITargetingRule and MatchedEvaluationPercentageRule to IPercentageOption in EvaluationDetails.
  • Add an optional CancellationToken parameter to the async methods of IConfigCatCache and IConfigCatClient.
  • Change the return type of the following IConfigCatClient methods: GetAllKeys/GetAllKeysAsync (to IReadOnlyCollection<string>) and GetAllValues/GetAllValuesAsync (to IReadOnlyDictionary<string, object?>).
  • Slightly change the behavior of flag overrides so an unsupported value specified for a flag does not prevent overrides of other flags.
  • Change the algorithm used to generate the config cache key and the format of the cache payload.