Skip to content

Releases: configcat/.net-sdk

v9.5.1

02 Jun 08:55
5ff3759

Choose a tag to compare

Improvements:

  • Implement a deterministic algorithm for cleaning up out-of-use internally created handlers (i.e., connection pools) in HttpClientConfigFetcher instead of relying on the GC calling their finalizers. (#138)
  • Improve debug logging. (#138)
  • Improve XML documentation of ConfigCatClientOptions.ConfigFetcher. (#138)
  • Improve performance by using ArrayPool<T> to reduce heap memory allocations. (#139)

Bug fixes:

  • Fix regression introduced in v9.5.0 that causes ConfigCatClientOptions.HttpTimeout to only apply to receiving the response headers instead of receiving the response headers and body. (#138)

v9.5.0

16 Mar 16:08
b8a1520

Choose a tag to compare

This release focuses on networking-related improvements. Upgrading is highly recommended if you occasionally see HTTP errors or timeouts in the SDK's log.

Improvements:

  • Implement logic to retry failed HTTP requests one time (on receiving unexpected status code, timeout or request error). (#134)
  • Implement protection against socket exhaustion theoretically possible in extreme cases. (Prevent recreation of HttpClientHandler within 30 seconds).
  • Deprecate ConfigCatClientOptions.HttpClientHandler. Alternative: ConfigCatClientOptions.Proxy or ConfigCatClientOptions.ConfigFetcher = new HttpClientConfigFetcher(...).
  • Add the new Proxy option to ConfigCatClientOptions.
  • Make HttpClientConfigFetcher public and allows subclassing to provide an extension point for customizing request headers.
  • Make reading response body in HttpClientConfigFetcher cancelable for targets below .NET 5.
  • Add debug logging to HttpClientConfigFetcher.
  • Add UnsupportedOSPlatform annotations for APIs that are not available when running in browser.
  • Log the CF-RAY header also when the headers are received but downloading the response body times out or fails.

Bug fixes:

  • Prevent sending additional headers when running in browser to avoid extra CORS OPTIONS requests.
  • Prevent disposing of externally created IConfigFetcher instances (as multiple ConfigCatClient may be configured to use those.)

v9.4.3

08 Aug 16:26
1cdafea

Choose a tag to compare

Bug fixes:

  • Fix NullReferenceException bug when accessing client instance during client initialization. (#116)
  • Catch potential exceptions in ConfigCatClient.Snapshot.

v9.4.2

23 Jun 13:03
146f2a2

Choose a tag to compare

Bug fixes:

  • Correct custom base URL detection and make it consistent with other SDKs. (#113)
  • Fix a regression that breaks config fetching in Unity WebGL when external cache is used. (#114)
  • Correct the Unity WebGL sample script to avoid unnecessary CORS OPTIONS requests.

v9.4.1

03 Jun 15:22
ceae5e6

Choose a tag to compare

Improvements:

  • Improve handling of the race condition between FetchAsync and Dispose in HttpClientConfigFetcher. Also, prepare DefaultConfigFetcher for ObjectDisposedException potentially thrown by HttpClientConfigFetcher or user-provided config fetcher implementations. (#110)
  • Minor improvement to logging-related intellisense documentation. (#111)

v9.4.0

30 May 12:40
1883e45

Choose a tag to compare

Improvements:

  • Include the SDK Key in log message of error 1100 ("Your SDK Key seems to be wrong...") (#108 )
  • Mask SDK Key (keep only the last 6 characters visible) when writing it to the log.
  • Make config URL generation more robust and make redirect logic consistent with other SDKs.
  • Use monitonic clock (Stopwatch.GetTimestamp) instead of system clock (DateTime.UtcNow) for scheduling poll iterations in Auto Polling mode for improved precision and resistance to system clock adjustments (time sync, user initiated clock adjustments, etc.) (#105)
  • Correct the internal cache refresh behavior in offline mode: if the client uses an external cache, a synchronization should happen in every case where a fetch operation would happen in online mode. (For example, in Auto Polling mode, the background polling loop should sync with the external cache even when it doesn't initiate config fetch operations.)
  • Eliminate race condition between concurrent cache synchronizations (on asynchronous code path only).
  • Raise ConfigChanged once per config refresh operation, eliminate race conditions around cache write, and improve performance in high concurrency situations by deduplicating config refresh instead of config fetch operation only.
  • Correct the intellisense docs for some config caching/refreshing-related APIs.

Bug fixes:

  • Fix a bug in HttpClientConfigFetcher. (The W/ prefix should not be stripped from the received ETag because other SDKs don't do that, which could lead to erroneous behavior when .NET and other SDKs use a shared cache.) (#108)
  • Fix a minor bug in ForceRefresh/ForceRefreshAsync. (Operation should synchronize with the external cache even in offline mode.) (#105)
  • Fix error reporting in ConfigCatClientSnapshot.GetValue/GetValueDetails. (Report correct error codes.)

Breaking changes:

  • Change ForceRefresh/ForceRefreshAsync to report failure and log a warning in offline mode only when the client is not configured to use an external cache. (Very low impact expected.) (#105)
  • Make the ClientReady event consistent with other SDKs in Auto Polling mode. When the client is offline, ClientReady is emitted as soon as the initial sync with the external cache completes. (Low impact expected.)
  • Make changes to also raise the ConfigChanged event when the local cache is updated as a result of synchronization with the external cache. (Low impact expected.)

v9.3.2

09 Oct 13:53
53af703

Choose a tag to compare

Security fixes:

  • Upgrade vulnerable version of System.Text.Json to patched version (see also dotnet/announcements#329). Affected target frameworks: net461, netstandard2.0, netstandard2.1, net5.0. (#100)

v9.3.1

11 Sep 09:03
c589c37

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

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

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.