azure_data_cosmos@0.32.0
Pre-release
Pre-release
0.32.0 (2026-04-09)
Features Added
- Added
CosmosClientBuilder::with_proxy_allowed(bool)for explicit opt-in to HTTP proxy usage with documented support limitations. (#4062) - Added
CustomResponseBuilderandFaultInjectionRule::hit_count()APIs for fault injection, enabling ergonomic construction of synthetic HTTP responses and test verification of rule activation counts. (#3888)
Breaking Changes
- HTTP proxies (
HTTPS_PROXY,HTTP_PROXY,ALL_PROXYenvironment variables) are now ignored by default. UseCosmosClientBuilder::with_proxy_allowed(true)to opt in. (#4062) - Client methods now return dedicated response types instead of
CosmosResponse<T>:ItemResponse<T>for point operations,ResourceResponse<T>for resource management,BatchResponsefor transactional batch, andQueryFeedPage<T>for query pages.etag()returnsOption<&Etag>instead ofOption<&str>, andactivity_id()/server_duration_ms()are accessed viaresponse.diagnostics(). (#3960) FeedPage::deconstruct()has been removed. Useinto_items(),continuation(),headers(), anddiagnostics()instead. (#3960)- Replaced
CosmosClientBuilder::with_application_region()with a mandatoryRoutingStrategyparameter onbuild(). UseRoutingStrategy::ProximityTo(region)to specify the application region. Also removedCosmosClientOptions::with_application_region(). (#3889) - Changed
default_ttlandanalytical_storage_ttlfields onContainerPropertiesfromOption<Duration>toTimeToLive, a new enum with variantsForever,NoDefault, andSeconds(u32), to correctly handle the-1wire value (TTL enabled with no default expiration). DatabaseClient::container_client()now returnsazure_core::Result<ContainerClient>, eagerly resolving container metadata (RID, partition key definition) at construction time. (#4005)PartitionKeyDefinitionfields (paths,kind,version) are now private; use accessor methodspaths(),kind(), andversion()instead.PartitionKeyKindchanged from a string newtype to an enum with variantsHash,MultiHash, andRange.PartitionKeyVersionis now an enum (V1,V2) instead ofOption<i32>. (#4005)- Replaced
ItemOptionswithItemReadOptions(forread_item) andItemWriteOptions(forcreate_item,replace_item,upsert_item,delete_item).QueryOptionsandBatchOptionsnow also embedOperationOptionsfor general-purpose settings like custom headers, excluded regions, and content response behavior. Replaced per-operationwith_custom_headersandwith_content_response_on_write_enabledhelpers withwith_operation_options. RemovedCosmosClientOptions::with_custom_headers(). (#4059) - Replaced
SessionToken,RegionName, ETag-based conditional fields, content response, and excluded regions types with driver-aligned equivalents:SessionToken(nowCow<'static, str>),Region(useRegion::EAST_USinstead ofregions::EAST_US),precondition: Option<Precondition>(replacingif_match_etag/if_match/if_none_match),OperationOptions::content_response_on_write: Option<ContentResponseOnWrite>(replacingcontent_response_on_write_enabled: bool), andOperationOptions::excluded_regions: Option<ExcludedRegions>. (#4059)
Bugs Fixed
- Fixes Circuit Breaker Failover Logic for Multi-Master Writes on 403/3. (#3861)
- Fixed partition key range fetch using mixed name/RID addressing, which caused 404 errors on certain operations. (#4047)
Other Changes
ContainerClient::read_itemnow executes through theazure_data_cosmos_driverpipeline, gaining driver-level transport, routing, and retry capabilities. (#4053)ContainerClient::create_itemnow executes through theazure_data_cosmos_driverpipeline, gaining driver-level transport, routing, and retry capabilities. (#4111)- Removed internal OpenTelemetry tracing spans pending alignment with Cosmos DB semantic conventions. Spans will return in a future release. (#4104)
- Added
azure_data_cosmos_driveras a runtime dependency for internal transport and caching. (#4005)