Skip to content

Releases: Azure/azure-sdk-for-rust

azure_core_test_macros@0.1.0

05 Jun 03:28
63499d1

Choose a tag to compare

Pre-release

0.1.0 (2026-06-04)

Features Added

  • Initial release.

azure_core_test@0.1.0

05 Jun 03:28
63499d1

Choose a tag to compare

azure_core_test@0.1.0 Pre-release
Pre-release

0.1.0 (2026-06-04)

Features Added

  • Initial release.

azure_messaging_eventhubs_checkpointstore_blob@0.9.0

03 Jun 20:22
7565eac

Choose a tag to compare

0.9.0 (Unreleased)

Features Added

Breaking Changes

Bugs Fixed

Other Changes

azure_messaging_eventhubs@0.15.0

03 Jun 20:22
7565eac

Choose a tag to compare

Pre-release

0.15.0 (Unreleased)

Features Added

  • The EventProcessor now opens every partition receiver with AMQP epoch (owner level) 0 and surfaces broker-initiated displacement as the new EventHubsError::ConsumerDisconnected error kind. When a second EventProcessor instance claims a partition this instance is currently holding, the broker disconnects this instance's receiver and the consumer's stream_events() resolves with ConsumerDisconnected. This matches the behavior of EventProcessorClient in the .NET and Java Azure SDKs. Consumers should pattern-match on ErrorKind::ConsumerDisconnected to detect a stolen partition and re-acquire a client via next_partition_client().
  • Added EventHubsError::ConsumerDisconnected(Option<AmqpDescribedError>) error variant.

Breaking Changes

  • On the receive path, the amqp:link:stolen AMQP condition is no longer auto-retried. A receiver displaced by a higher-or-equal-epoch attacher now surfaces the error (translated to EventHubsError::ConsumerDisconnected by EventReceiver::stream_events) instead of silently re-attaching. Sender, CBS, and management operations retain the historical retry-on-stolen behavior.

Bugs Fixed

  • Increased DEFAULT_PARTITION_EXPIRATION_DURATION from 10 seconds to 60 seconds. The previous default was shorter than DEFAULT_UPDATE_INTERVAL (30 seconds), so ownership records expired between load-balancing cycles. The load balancer perpetually saw current=0 for every consumer and continuously re-claimed partitions, causing widespread duplicate event processing. EventProcessorBuilder::build now rejects configurations where partition_expiration_duration <= update_interval. (#3851)
  • The EventProcessor's load-balancer reconciliation now closes the underlying AMQP receiver for any partition that has been reassigned to another consumer, so the consumer's stream_events() resolves and the loop can terminate. Previously a stolen partition's client could continue to attempt receives until the broker tore down the link.

Other Changes

azure_data_cosmos_driver@0.3.0

29 May 21:24
c8eb8e8

Choose a tag to compare

Pre-release

0.3.0 (2026-05-29)

Features Added

  • CosmosError can capture a stack backtrace on construction. Capture is opt-in (off by default; on when RUST_BACKTRACE is set or when explicit capacities are supplied) and protected against error storms by two configurable per-second limiters on the runtime builder. See the README for details. (#4442)
  • Introduced CosmosError and the crate-wide Result<T> alias as the driver's first-class error type, always exposing the typed CosmosStatus (with predicates like is_not_found() / is_throttled() / is_transient()), the originating CosmosResponse (when received), and the operation DiagnosticsContext. Construction goes through the fluent CosmosErrorBuilder. (#4442)
  • Added PartitionKeyDefinition::with_kind(PartitionKeyKind) and PartitionKeyDefinition::with_version(PartitionKeyVersion) consuming setters so callers can override the auto-inferred kind and the default V2 version without resorting to private-field workarounds. PartitionKeyDefinition::new(paths) continues to auto-infer the kind from the path count.
  • Reshaped PatchInstructions API so that PatchInstructions::new() creates an empty instruction set, where individual operations can be added via with_operation(). The PatchInstructions type also implements From<Vec<PatchOperation>> for ergonomic construction from a vector.
  • Refactored the driver response surface: introduced ResponseBody (a NoPayload / Bytes(Bytes) / Items(Vec<Bytes>) enum with single(), items(), into_single::<T>(), into_items::<T>(), and is_empty() helpers), added typed CosmosRequestHeaders fields for query / changefeed headers (max_item_count, incremental_feed, populate_index_metrics, populate_query_metrics, enable_cross_partition_query) so callers no longer need raw custom_headers, the pipeline now auto-emits x-ms-documentdb-isquery: True and Content-Type: application/query+json for OperationType::Query, and CosmosStatus gained PartialEq<StatusCode>, From<CosmosStatus> for StatusCode/u16, and a CosmosStatus::new(StatusCode) constructor. (#4401)
  • Added support for the x-ms-cosmos-hub-region-processing-only request header on retries after a 404 / 1002 (READ_SESSION_NOT_AVAILABLE) response on single-master data-plane Cosmos operations. The header asks the backend to route only to a region that has caught up to the requested LSN, reducing the chance of a follow-up retry hitting a region whose session is also behind. The header is scoped to single-master accounts (multi-master accounts already have a different recovery path) and to data-plane operations (metadata-pipeline operations are out of scope per the design spec). Once latched on the first 1002 within an operation, the header is emitted on every subsequent retry for that operation. (#4389)
  • Added local query-plan generator scaffolding under crate::query (lexer, parser, AST, planner, and in-memory evaluator). The scaffolding is not wired into the production query path yet — production callers still issue Gateway query-plan requests via CosmosOperation::query_plan. The __internal_testing cargo feature exposes query::__test_only_generate_query_plan_for_pk_paths, query::__TEST_ONLY_SUPPORTED_QUERY_FEATURES, and CosmosOperation::query_plan for cross-crate gateway-comparison tests; this feature is intentionally unstable and not covered by SemVer.
  • Added per-partition automatic failover (PPAF) for writes on single-master accounts. On 403/3 WriteForbidden, 503 ServiceUnavailable, 429/3092 SystemResourceUnavailable, 410/1022 Gone, or 408 RequestTimeout from a region, the affected partition is failed over to the next preferred region; subsequent writes for that partition skip the failed region. (#4156)
  • Added per-partition circuit breaker (PPCB) for reads (any account) and writes (multi-master accounts). Tracks failure counts per (partition_key_range_id, region) and routes to an alternate region once the threshold (default 10 reads, 5 writes) is exceeded. A background failback loop probes the original region for recovery. (#4156)
  • Added OperationOptions fields for tuning PPCB: circuit_breaker_failure_count_for_reads, circuit_breaker_failure_count_for_writes, circuit_breaker_timeout_counter_reset_window_in_minutes, allowed_partition_unavailability_duration_in_seconds, ppcb_stale_partition_unavailability_refresh_interval_in_seconds, and per_partition_circuit_breaker_enabled (each also configurable via the corresponding AZURE_COSMOS_* environment variable). (#4156)
  • Added CosmosDriverRuntimeBuilder::with_wrapping_sdk_identifier(impl Into<String>) so higher-level SDKs can prepend their own identifier (e.g., azsdk-rust-cosmos/0.34.0) to the driver's User-Agent prefix. The driver only sanitizes ASCII and trims whitespace; the wrapping SDK is responsible for the full token format. When set, the User-Agent becomes <wrapping> azsdk-rust-cosmos-driver/<ver> <os>/<arch> rustc/<ver> [suffix]; when unset, the existing format is unchanged. (#4465)
  • Added OperationType::Patch plus CosmosOperation::patch_item() and the PatchOperation/CosmosNumber/PatchDocument model types. Patches are executed driver-side as a Read-Modify-Write loop via a dedicated patch_handler pipeline stage; see docs/PATCH_HANDLER_SPEC.md for the full contract. The handler owns the internal If-Match precondition end-to-end and rejects any caller-set Precondition on the outer PATCH operation with a clear error before issuing any sub-operation. (#4386)

Breaking Changes

  • Renamed the error surface: ErrorCosmosError, ErrorBuilderCosmosErrorBuilder. Categorization moved from a Kind enum to predicates on CosmosStatus (is_not_found(), is_throttled(), is_transient(), …); error details are reached via status() and response() instead of the previous flat accessors. (#4442)
  • Renamed MaxItemCount to MaxItemCountHint to better reflect that the value is a hint to the service (which may return fewer items) rather than a strict cap. The SDK already exposed the type under the new name via a use ... as MaxItemCountHint; the rename makes the canonical name consistent across both crates. Update callers that reference azure_data_cosmos_driver::models::MaxItemCount, CosmosRequestHeaders::max_item_count typings, or CosmosOperation::with_max_item_count argument types accordingly.
  • Marked PartitionKeyVersion and CosmosStatus as #[non_exhaustive] to allow future variants/fields to be added without further breaking changes. Callers must use .. wildcard arms when matching on PartitionKeyVersion; CosmosStatus already had private fields and is constructed via CosmosStatus::new / with_sub_status, so the attribute is primarily a forward-compat signal.
  • Slimmed the cached PartitionKeyRange to six fields, dropping eight metadata fields the routing-map cache never reads (resource_id, self_link, etag, timestamp, rid_prefix, target_throughput, lsn, owned_archival_pk_range_ids). The struct now retains the four fields the routing layer consults (id, min_inclusive, max_exclusive, status) plus throughput_fraction and parents, kept on the cached representation for downstream consumers that read them directly. As part of this change, PartialEq and Hash no longer hash resource_id: two ranges with the same id / min_inclusive / max_exclusive are now equal regardless of their _rid. Internal callers never used PartitionKeyRange as a hash-map key, but downstream consumers that did so should review their assumptions. Service responses are unchanged on the wire — the dropped JSON fields are silently ignored by serde on deserialization. (#4393)
  • Changed CosmosResponse::diagnostics() to return Arc<DiagnosticsContext> instead of &DiagnosticsContext. The returned Arc derefs transparently for read-only inspection (existing call patterns like response.diagnostics().activity_id() continue to work), but bindings of the form let d = response.diagnostics(); now own a cloned Arc handle rather than a borrow — letting callers retain operation diagnostics across into_body(). Replaces the additive CosmosResponse::diagnostics_arc() accessor introduced earlier in this preview cycle.
  • Removed CosmosResponse::body() -> &[u8]. The previous accessor panicked on multi-item feed bodies, which is unsafe for a public API. The non-consuming body_parts() -> &ResponseBody accessor has been renamed to body(). Callers needing borrowed access should pattern-match on ResponseBody::Bytes(b) / ResponseBody::Items(items); consuming callers can use into_body().single_item::<T>() or into_body().single().
  • Replaced EffectivePartitionKey::min() / EffectivePartitionKey::max() with associated constants EffectivePartitionKey::MIN / EffectivePartitionKey::MAX. The inner storage also changed from String to Cow<'static, str> so the constants can borrow static strings without allocating. Callers should rewrite EffectivePartitionKey::min() as EffectivePartitionKey::MIN.clone() (or just &EffectivePartitionKey::MIN for comparisons).
  • Removed PartitionKeyValue::undefined() (use the existing PartitionKeyValue::UNDEFINED associated constant instead) and replaced the test-only PartitionKeyValue::infinity() cons...
Read more

azure_data_cosmos@0.34.0

29 May 21:24
c8eb8e8

Choose a tag to compare

Pre-release

0.34.0 (2026-05-29)

Features Added

  • CosmosError can capture a stack backtrace on construction. Capture is opt-in (off by default; on when RUST_BACKTRACE is set or when explicit capacities are supplied) and protected against error storms by two configurable per-second limiters on the runtime builder. (#4442)
  • Introduced azure_data_cosmos::CosmosError and the crate-wide azure_data_cosmos::Result<T> alias, surfacing typed CosmosStatus (with predicate accessors like is_not_found() / is_throttled() / is_transient()), the originating CosmosResponse, and the operation DiagnosticsContext on every failure. From<CosmosError> for azure_core::Error is provided so callers using ? against azure_core::Error continue to compose. (#4442)
  • Added RoutingStrategy::PreferredRegions to allow specifying a fixed region preference order for failover, hedging, and retry. (#4485)
  • Standardized every client-method options type with a public operation: OperationOptions field and with_operation_options(OperationOptions) -> Self setter, so any per-request OperationOptions setting can be configured via any options type. The following options types previously had no way to attach OperationOptions and now do: ReadContainerOptions, ReadDatabaseOptions, ReplaceContainerOptions, CreateContainerOptions, CreateDatabaseOptions, DeleteContainerOptions, DeleteDatabaseOptions, QueryContainersOptions, QueryDatabasesOptions, ThroughputOptions, ReadFeedRangesOptions. For CreateContainerOptions / CreateDatabaseOptions / ReplaceContainerOptions, the SDK still forces content_response_on_write = Enabled on the resolved options because control-plane mutations require the response body. ReadFeedRangesOptions::operation is currently inert (the underlying routing-map cache does not go through the operation pipeline) but is added for shape consistency with the other options types. (#4447)
  • Added new() constructors and with_x consuming setters to multi-required-field model types so callers can build them declaratively without struct-literal syntax (which is now blocked by #[non_exhaustive]): VectorEmbedding::new(path, data_type, dimensions, distance_function) + with_path / with_data_type / with_dimensions / with_distance_function; ConflictResolutionPolicy::new(mode) + with_resolution_path / with_resolution_procedure; SpatialIndex::new(path) + with_type (singular pusher onto types); CompositeIndexProperty::new(path, order) + with_path / with_order; VectorIndex::new(path, index_type) + with_path / with_index_type. These types do not implement Default — their constructors require values that have no meaningful default. (#4447)
  • Derived Default on VectorEmbeddingPolicy, UniqueKeyPolicy, UniqueKey, PropertyPath, and CompositeIndex, and added singular with_x pushers / setters: VectorEmbeddingPolicy::with_embedding, UniqueKeyPolicy::with_unique_key, UniqueKey::with_path, PropertyPath::with_path, and CompositeIndex::with_property. This matches the existing IndexingPolicy::with_included_path style and lets callers build these policies declaratively without constructing intermediate Vecs. (#4447)
  • Added QueryFeedPage::as_feed_page() returning &FeedPage<T>, so a query page can be passed to APIs that accept the more general FeedPage type. Query-specific metadata (index/query metrics) remains accessible on the QueryFeedPage itself. (#4447)
  • Added QueryOptions::with_populate_index_metrics(bool), with_populate_query_metrics(bool), and with_max_item_count(MaxItemCountHint) setters. These replace the previous pattern of passing raw x-ms-cosmos-populateindexmetrics, x-ms-documentdb-populatequerymetrics, and x-ms-max-item-count values through OperationOptions::with_custom_headers for query execution. max_item_count takes the new MaxItemCountHint enum with ServerDecides and Limit(NonZeroU32) variants, so callers don't have to traffic in the -1 wire sentinel directly. (#4401)
  • Added ContainerClient::patch_item() for applying JSON-Patch-style mutations to a single item. Supports add/set/replace/remove/increment/move ops via the new PatchInstructions/PatchOperation/CosmosNumber types. Added PatchItemOptions for per-request configuration (max_attempts, session_token, etc.). PatchItemOptions intentionally does not expose a Precondition or SQL filter predicate — the driver-side PATCH handler owns the internal If-Match end-to-end, and predicate evaluation is out of scope for this preview. The method's rustdoc documents the non-idempotent-under-transport-failure caveat. (#4386)
  • Support for simple cross-partition queries with SELECT projections and WHERE filters. Cross-partition queries are now done through fan-out in the client, and provide a client-generated continuation token that can be used to resume the query. See ContainerClient::query_items() and FeedScope for details. (#4440)
  • Added QueryOptions::continuation_token and QueryOptions::with_continuation_token(...) for resuming queries from a continuation token. (#4440)
  • Added a new FeedOptions type that wraps the paging knobs (max_item_count, continuation_token) common to feed-style operations, so future feed APIs (change feed, read-feed, etc.) can adopt the same shape without redeclaring fields. QueryOptions now embeds it as a pub feed: FeedOptions field with a with_feed_options(FeedOptions) setter. The existing QueryOptions::with_max_item_count and QueryOptions::with_continuation_token setters are retained as convenience functions that mutate the embedded feed (they're expected to be used commonly enough to warrant the shortcut). (#4447)

Breaking Changes

  • All fallible public APIs now return azure_data_cosmos::Result<T> (= Result<T, CosmosError>) instead of azure_core::Result<T>, and the error type was renamed ErrorCosmosError (with CosmosErrorBuilder for construction). Categorization moved from a Kind enum to predicates on CosmosStatus (is_not_found(), is_throttled(), is_transient(), …); the underlying azure_core::Error is still reachable via std::error::Error::source(). (#4442)
  • Moved QueryOptions::max_item_count and QueryOptions::continuation_token into the new QueryOptions::feed: FeedOptions field. Callers that read or assign these fields directly should switch to options.feed.max_item_count / options.feed.continuation_token. The with_max_item_count / with_continuation_token convenience setters on QueryOptions continue to work unchanged. (#4447)
  • ThroughputProperties is now #[non_exhaustive] and no longer derives Default. The Default impl produced a meaningless wire payload (no manual throughput and no autoscale settings, which would send an empty offer body). Callers should use ThroughputProperties::manual(throughput) or ThroughputProperties::autoscale(starting_maximum_throughput, increment_percent) instead. (#4447)
  • Marked the following public model enums and response wrappers as #[non_exhaustive] to allow future variants/fields to be added without further breaking changes: VectorDataType, VectorDistanceFunction, ConflictResolutionMode, IndexingMode, SpatialType, CompositeIndexOrder, VectorIndexType, BatchResponse, ItemResponse, ResourceResponse<T>, ResponseBody, ResponseHeaders, PartitionKeyVersion and CosmosStatus. Callers must use .. wildcard arms in matches over these enums and cannot construct these structs via struct-literal syntax (the SDK already provides constructors / setters for the constructable types). (#4447)
  • CosmosClientBuilder::build now takes AccountReference directly instead of impl Into<AccountReference>. Callers should construct an AccountReference explicitly via AccountReference::with_credential or AccountReference::with_authentication_key and pass it in. (#4447)
  • Replaced EffectivePartitionKey::min() / EffectivePartitionKey::max() with associated constants EffectivePartitionKey::MIN / EffectivePartitionKey::MAX. The inner storage also changed from String to Cow<'static, str> so the constants can borrow static strings without allocating. Callers should rewrite EffectivePartitionKey::min() as EffectivePartitionKey::MIN.clone() (or just &EffectivePartitionKey::MIN for comparisons). (#4447)
  • Removed PartitionKeyValue::undefined() (use the existing PartitionKeyValue::UNDEFINED associated constant instead) and replaced the test-only PartitionKeyValue::infinity() constructor with a publicly-available PartitionKeyValue::INFINITY associated constant. (#4447)
  • Removed FeedRange::can_merge() and FeedRange::merge_with(). These are SDK-internal helpers used only by the session-token coalescing pipeline and are now implemented internally. ([#4447](https://git...
Read more

azure_storage_queue@1.0.0

14 May 01:04
9c562dc

Choose a tag to compare

1.0.0 (2026-05-13)

Breaking Changes

  • Consolidated client constructors: QueueClient::from_url() has been renamed to new(), replacing the previous endpoint-plus-queue-name string overload. Each client now has a single new() that takes a fully-formed Url:
    • QueueClient::new(queue_url: Url, ...)
    • QueueServiceClient::new(service_url: Url, ...)
  • Renamed QueueClient::endpoint() and QueueServiceClient::endpoint() to url() for consistency with other Storage clients.
  • QueueClient::send_message() now returns ListOfSentMessage instead of a single SentMessage. Access the sent message via ListOfSentMessage::items.

Bugs Fixed

  • QueueClient::new() and QueueServiceClient::new() now reject non-base URLs (e.g. data:, mailto:).

azure_storage_blob@1.0.0

14 May 01:04
9c562dc

Choose a tag to compare

1.0.0 (2026-05-13)

Breaking Changes

  • Consolidated client constructors: the existing from_url() constructors have been renamed to new(), replacing the previous endpoint-plus-name string overloads. Each client now has a single new() that takes a fully-formed Url:
    • BlobClient::new(blob_url: Url, ...)
    • BlockBlobClient::new(blob_url: Url, ...)
    • AppendBlobClient::new(blob_url: Url, ...)
    • PageBlobClient::new(blob_url: Url, ...)
    • BlobContainerClient::new(container_url: Url, ...)
    • BlobServiceClient::new(service_url: Url, ...)
  • BlobServiceClient::find_blobs_by_tags() is now pageable and returns Result<Pager<FilteredBlobResponse, XmlFormat>> instead of Result<Response<FilterBlobSegment, XmlFormat>>.
  • BlobContainerClient::find_blobs_by_tags() is now pageable and returns Result<Pager<FilteredBlobResponse, XmlFormat>> instead of Result<Response<FilteredBlobResponse, XmlFormat>>.
  • Renamed FilterBlobSegment to FilteredBlobResponse.
  • Renamed FilteredBlobResponse.blobs to FilteredBlobResponse.blob_items.
  • Changed FilteredBlobResponse.blob_items from Option<Vec<FilterBlobItem>> to Vec<FilterBlobItem>.
  • Renamed ListContainersSegmentResponse to ListContainersResponse.
  • Removed BlobFlatListSegment wrapper; ListBlobsResponse.blob_items is now Vec<BlobItem> directly (previously accessed via .segment.blob_items).
  • Renamed BlobProperties.customer_provided_key_sha256 to encryption_key_sha256.
  • Renamed BlobMetadata.additional_properties to values.
  • Renamed PageBlobClientCreateOptions::with_if_not_exists() to if_not_exists().
  • Renamed AppendBlobClientCreateOptions::with_if_not_exists() to if_not_exists().
  • Renamed BlockBlobClientUploadBlobFromUrlOptions::with_if_not_exists() to if_not_exists().
  • Renamed BlockBlobClientUploadOptions::with_if_not_exists() to if_not_exists().
  • Removed the endpoint() method from all clients. Use url() instead.
  • Removed PageBlobClient::get_page_ranges() along with the PageList, PageRange, ClearRange, PageBlobClientGetPageRangesOptions, and PageListHeaders types.
  • Removed the azure_storage_blob::error and azure_storage_blob::models::error module paths. Use the re-exported azure_storage_blob::{Result, StorageError} instead.

Features Added

  • Added with_tags() helpers to set blob tags on create/upload options by accepting BlobTags or HashMap<String, String> and encoding them into the x-ms-tags header format:
    • PageBlobClientCreateOptions::with_tags()
    • AppendBlobClientCreateOptions::with_tags()
    • BlockBlobClientUploadOptions::with_tags()
    • BlockBlobClientUploadBlobFromUrlOptions::with_tags()
    • BlockBlobClientCommitBlockListOptions::with_tags()

Bugs Fixed

  • All client constructors (BlobClient::new(), BlobContainerClient::new(), BlobServiceClient::new(), AppendBlobClient::new(), BlockBlobClient::new(), PageBlobClient::new()) now reject non-base URLs (e.g. data:, mailto:).

azure_security_keyvault_secrets@1.0.0

13 May 17:43
b18921f

Choose a tag to compare

1.0.0 (2026-05-12)

Features Added

  • Initial stable release.

Breaking Changes

  • Vault URLs must use TLS (https).

azure_security_keyvault_keys@1.0.0

13 May 17:43
b18921f

Choose a tag to compare

1.0.0 (2026-05-12)

Features Added

  • Initial stable release.

Breaking Changes

  • Vault URLs must use TLS (https).