Skip to content

Kontent.Ai.Sync 2.0.0-rc.2

Pre-release
Pre-release

Choose a tag to compare

@net-release-bot net-release-bot released this 12 Aug 13:37

Fixed

  • The named-options accessor requires the client name it reads. It accepted a null name and fell back to the unnamed registration, which only exists when a default client was registered — so on a named-only setup that path would have resolved a SyncOptions nobody configured and built requests against a blank environment rather than failing. No caller passed null; the parameter is now non-nullable, matching the Delivery SDK's equivalent.

  • The pass-through CreateRefitSettings wrapper is gone, along with its summary describing a customization hook that had been removed.

  • The Refit settings no longer configure a query string this API does not have. A collection format and URL key formatter were carried over from the Delivery SDK, but the sync endpoints send the environment in the path and the continuation token in a header — there is no query parameter for either setting to apply to.

  • SyncClientBuilder's remark matches its signature, which returns the concrete SyncClient — that is what makes the client it hands back disposable.

  • ChangeType serializes the value the API sends. Its own converter took precedence over the SDK's and carried no naming policy, so writing a delta produced "Changed" where the wire uses "changed" — reading was unaffected, being case-insensitive, so this only surfaced for a consumer re-sending what they had read. Each member now states its wire name.

  • The client factory no longer relabels an exception that came from your own registration. Get(name) caught InvalidOperationException and reported it as a missing client, so a configureHttpClient that rejected its input came back as "No sync client registered with name '…'". A genuinely missing registration still says so.

  • The 1.0 → 2.0 upgrade guide's first paragraph no longer links to a guide that was retired.

  • SyncOptionsBuilder.Build copies by reflection rather than property by property. It listed the properties it carried, which keeps compiling when an option is added and silently stops carrying it — a value the caller set that the client never sees.

  • The X-KC-SOURCE header keeps naming the integration that made the call. Attribution matched the SDK assembly by full name, which carries the version — and nothing pins AssemblyVersion, so the reference an integration recorded when it was built stopped matching on the first SDK release after that. The header then went silently missing for every consumer who had not rebuilt. Matching is now by simple name.

  • A request is bounded again when the SDK's own resilience pipeline is not the one installed. HttpClient.Timeout was set to Timeout.InfiniteTimeSpan unconditionally, on the premise that the resilience pipeline owns timing - but the 30-second per-attempt timeout that premise rests on exists only while EnableResilience is left on and no configureResilience hook replaces the default pipeline. Setting EnableResilience = false, or supplying a pipeline that adds no timeout of its own, therefore left a call with no attempt timeout, no overall timeout and no ceiling of any kind, so a connection that stopped responding hung the caller indefinitely. This affected both the container-registered client and the container-free one, which builds its own transport. The ceiling is now lifted only for the default pipeline; otherwise HttpClient's 100-second default applies, as it did in 1.0. A custom pipeline that legitimately needs longer can raise it through configureHttpClient.

  • An attempt the resilience pipeline timed out is now retried instead of failing the whole call. The default pipeline wraps retry around a 30-second per-attempt timeout, so a hung attempt reaches the retry as Polly's TimeoutRejectedException - a type the SDK's transient classifier did not recognise. The single situation that per-attempt timeout exists for, a connection that stops responding and that a fresh attempt would recover from, therefore failed the whole call after 30 seconds with no retries at all.

Installation

dotnet add package Kontent.Ai.Sync --prerelease

Full changelog: src/sync/CHANGELOG.md