Skip to content

Releases: configcat/.net-sdk

v9.3.1

11 Sep 09:03
c589c37
Compare
Choose a tag to compare

Bug fixes:

  • Check cache expiration in every poll iteration, not just the first one in Auto Polling mode to reduce network traffic when the SDK uses a shared cache. (#98)
  • Synchronize in-memory cache with the external cache in every poll iteration, not just the first one in Auto Polling mode regardless of offline mode to keep in-memory cache up-to-date when the SDK uses a shared cache.

v9.3.0

28 Aug 13:46
9d4acd7
Compare
Choose a tag to compare

New features:

  • Provide a new, more convenient way (ConfigCatClientOptions.LogFilter) for consumers to specify custom log event filter logic. (#95)

Improvements:

  • Make the SDK trimmable and AOT-friendly by switching to source generated JSON serialization. Now it is compatible with AOT deployment models like NativeAOT, wasm-tools, IL2CPP, etc. (#94)
  • Add support for Unity WebGL. (See ConfigCatClient.PlatformCompatibilityOptions and sample script files.)
  • Switch to source generated regular expressions for improving performance in .NET 8+ applications.
  • Minor performance improvements (reduced memory allocation) around log messages and evaluation log building. (#95)
  • Include additional clues in log messages when config fetching from CDN servers fails to make it easier to investigate issues. (#96)

v9.2.0

13 May 11:57
4325672
Compare
Choose a tag to compare

New features and improvements:

  • Add methods ("snapshot API") which make it possible to synchronously evaluate feature flags/settings without block waiting for potential underlying I/O operations. At the same time, deprecate synchronous methods that may involve block waiting. (#81)
  • Add a parameter named CacheState to the event args of the ClientReady event, by means of which consumers can get information about the initialization state of the client.
  • Define error codes (EvaluationErrorCode, RefreshErrorCode) and expose them (EvaluationDetails.ErrorCode, RefreshResult.ErrorCode) to consumers so they can reliably identify the error type without resorting to guess it by checking the error message. (#86)
  • Introduce a new hook named ConfigFetched which can be used to observe config fetching-related errors even when refreshing is done by the SDK.
  • Add the missing GetKeyAndValue/GetKeyAndValueAsync method to improve consistency with other SDKs. (#91)

Bug fixes:

  • Make subscription to hook events thread-safe.

v9.1.0

21 Mar 10:34
ed0a54d
Compare
Choose a tag to compare

Improvements:

  • Make naming of UserComparator members consistent. (#89)
  • Adjust the terminology used in XML comments to the main documentation.
  • Minor performance improvements. (#88)

Bug fixes:

  • Use HttpClientHandler.AutomaticDecompression only when it's available (to support Blazor WASM). (#90)
  • Fix a few edge cases where user attribute values was not converted to their canonical string representations. (#88)
  • Don't accept string arrays that contain null values in the case of ARRAY (NOT) CONTAINS ANY OF comparators.
  • Allow leading/trailing whitespace in length prefix for (NOT) STARTS/ENDS WITH ANY OF comparators to align behavior with other SDKs. (#89)
  • Align evaluation logging and evaluator error reporting in some edge cases where the config JSON contains errors.
  • Correct grammar mistakes in error messages.

Breaking changes:

  • Change the name of some UserComparator members: Is(Not)OneOf -> TextIs(Not)OneOf, SensitiveIs(Not)OneOf -> SensitiveTextIs(Not)OneOf, (Not)ContainsAnyOf -> Text(Not)ContainsAnyOf. (Low impact expected.)

v9.0.1

09 Jan 14:03
71f21c0
Compare
Choose a tag to compare

Improvements:

  • Don't swallow but log exceptions when config JSON deserialization fails so users can get a clue about what went wrong with the deserialization.
  • Improve the message of log event 1103.
  • Minor code quality improvements.

v9.0.0

21 Nov 16:29
70c1d69
Compare
Choose a tag to compare

New features and improvements:

  • Add support for the new Config JSON v6 format: update the config model and implement new features in setting evaluation logic. (#75)
  • Overhaul setting evaluation-related logging and make it consistent across SDKs.
  • Significant performance improvements to setting evaluation, especially when info level logging is turned off:
Method LogInfo Mean Error StdDev Gen0 Allocated
MatrixTests_ConfigV5 False 47.31 ms 1.741 ms 0.095 ms 9909.0909 39.61 MB
MatrixTests_ConfigV6 False 17.25 ms 3.376 ms 0.185 ms 3468.7500 13.84 MB

Bug fixes:

  • Hook event handlers which close over the client instance should not prevent the client from being collected by the GC when user has no more references to the client instance. (#82)
  • Fix a minor bug in the Task.WaitAsync polyfill: potential cancellation or exception needs to be propagated in every case. (#83)
  • Avoid making an unnecessary copy of the input string when deserializing JSON in .NET 4.5.

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

  • Change the type of the User.Custom property from IDictionary<string, string?> to IDictionary<string, object> to allow other values than string but disallow null values. (#75)
  • The config JSON v5 format is no longer accepted by flag overrides. If you use this feature, you will need to convert your override JSON file(s) to the v6 format. You can do this using the config-json convert v5-to-v6 command of the ConfigCat CLI tool.
  • Rename the MatchedEvaluationRule property to MatchedTargetingRule and the MatchedEvaluationPercentageRule property to MatchedPercentageOption in EvaluationDetails.
  • Throw ArgumentException when the SDK key passed to ConfigCatClient.Get is in invalid format (unless the client is set up to use local-only flag override behavior).
  • Change config model (IConfig and related interfaces/enums).
  • Slightly change the behavior of the ClientReady hook in Auto Poll mode to fire after the completion of the first fetch operation - regardless of success or failure - to make the behavior consistent with other SDKs. (#79)
  • Change the User.AllAttributes property into a method (GetAllAttributes) as it allocates under the hood.
  • Revert EvaluationDetails and RefreshResult from records to plain types as value equality is not implemented correctly (and it would not be really useful anyway).

v8.2.0

26 Jul 10:31
57f08f2
Compare
Choose a tag to compare

Bug fixes:

  • Fix reported SDK version (removes Git commit hash from the version string).
  • Fix error logging of GetValue(Async)/GetValueDetails(Async) calls.
  • Fix XML documentation of Comparator.Contains/NotContains.

Breaking changes:

  • Remove unintended setter of IPercentageOption.VariationId. (Very low impact expected.)

v8.1.1

23 Jun 15:45
939f897
Compare
Choose a tag to compare

Bug fixes:

  • Fix return value of GetAllValues/GetAllValuesAsync when one or more settings evaluate with error.
  • Add missing unsupported value check when evaluating multiple settings.

v8.1.0

12 Jun 16:31
19d647a
Compare
Choose a tag to compare

New features and improvements:

  • Remove unnecessary package references (#71).
  • Use a standardized config cache key generation algorithm and cache payload format to allow shared caches to be used by SDKs of different platforms.
  • Enable deterministic (a.k.a. reproducible) build.
  • Minor improvements to the XML documentation.

v8.0.0

26 May 18:58
775aa17
Compare
Choose a tag to compare

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.