Releases: configcat/.net-sdk
Releases · configcat/.net-sdk
v9.5.1
Improvements:
- Implement a deterministic algorithm for cleaning up out-of-use internally created handlers (i.e., connection pools) in
HttpClientConfigFetcherinstead 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.HttpTimeoutto only apply to receiving the response headers instead of receiving the response headers and body. (#138)
v9.5.0
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
HttpClientHandlerwithin 30 seconds). - Deprecate
ConfigCatClientOptions.HttpClientHandler. Alternative:ConfigCatClientOptions.ProxyorConfigCatClientOptions.ConfigFetcher = new HttpClientConfigFetcher(...). - Add the new
Proxyoption toConfigCatClientOptions. - Make
HttpClientConfigFetcherpublic and allows subclassing to provide an extension point for customizing request headers. - Make reading response body in
HttpClientConfigFetchercancelable for targets below .NET 5. - Add debug logging to
HttpClientConfigFetcher. - Add
UnsupportedOSPlatformannotations for APIs that are not available when running in browser. - Log the
CF-RAYheader 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
IConfigFetcherinstances (as multipleConfigCatClientmay be configured to use those.)
v9.4.3
v9.4.2
v9.4.1
Improvements:
- Improve handling of the race condition between
FetchAsyncandDisposeinHttpClientConfigFetcher. Also, prepareDefaultConfigFetcherforObjectDisposedExceptionpotentially thrown byHttpClientConfigFetcheror user-provided config fetcher implementations. (#110) - Minor improvement to logging-related intellisense documentation. (#111)
v9.4.0
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
ConfigChangedonce 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. (TheW/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/ForceRefreshAsyncto 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
ClientReadyevent consistent with other SDKs in Auto Polling mode. When the client is offline,ClientReadyis emitted as soon as the initial sync with the external cache completes. (Low impact expected.) - Make changes to also raise the
ConfigChangedevent when the local cache is updated as a result of synchronization with the external cache. (Low impact expected.)
v9.3.2
v9.3.1
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
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.PlatformCompatibilityOptionsand 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
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
CacheStateto the event args of theClientReadyevent, 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
ConfigFetchedwhich can be used to observe config fetching-related errors even when refreshing is done by the SDK. - Add the missing
GetKeyAndValue/GetKeyAndValueAsyncmethod to improve consistency with other SDKs. (#91)
Bug fixes:
- Make subscription to hook events thread-safe.