Skip to content

Commit 60f89d3

Browse files
committed
Merge release branch
2 parents 417c7a2 + 75c9c29 commit 60f89d3

88 files changed

Lines changed: 2321 additions & 11666 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sdk/cosmos/.cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
"centralindia",
2525
"centralus",
2626
"centraluseuap",
27+
"cgroupv",
28+
"cgroupv2",
2729
"changefeed",
2830
"chinaeast",
2931
"chinanorth",
@@ -181,6 +183,7 @@
181183
"usdodsouthcentral",
182184
"usdodsouthwest",
183185
"usdodwestcentral",
186+
"usec",
184187
"USGOV",
185188
"usgovarizona",
186189
"usgoviowa",

sdk/cosmos/azure_data_cosmos/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
### Features Added
66

77
### Breaking Changes
8+
- Removed the `request_url()` accessor (gated on the `fault_injection` feature) from `ItemResponse`/`ResourceResponse`/`BatchResponse`. Driver-routed operations never populated it, so it always returned `None` in current usage.
89

910
- `CosmosClientBuilder::with_user_agent_suffix` (and `CosmosClientOptions::with_user_agent_suffix`) now take `UserAgentSuffix` instead of `impl Into<String>`. Callers passing a `&str` or `String` must construct the value explicitly via `UserAgentSuffix::new` (panics on invalid input) or `UserAgentSuffix::try_new` (returns `Option`). Validation rules (max 25 characters, HTTP-header-safe) are now enforced at the construction site instead of being applied silently inside the builder. ([#4368](https://github.com/Azure/azure-sdk-for-rust/pull/4368))
1011
- `ContainerClient::query_items()` now takes a `QueryScope` (`QueryScope::partition(...)`, `QueryScope::feed_range(...)`, or `QueryScope::full_container()`) instead of a partition key where `()` represented cross-partition queries.
1112

13+
- Replaced `CosmosDiagnostics` with `CosmosDiagnosticsContext` (a re-export of `azure_data_cosmos_driver::diagnostics::DiagnosticsContext`). All response types now return `Arc<CosmosDiagnosticsContext>` from `diagnostics()` (the returned `Arc` derefs transparently to `CosmosDiagnosticsContext` for read-only inspection, and can be retained alongside a consumed response body). The previous `activity_id() -> Option<&str>` and `server_duration_ms() -> Option<f64>` accessors on `CosmosDiagnostics` are replaced by `CosmosDiagnosticsContext::activity_id() -> &ActivityId` and per-request server timing via `CosmosDiagnosticsContext::requests()[i].server_duration_ms()`.
14+
15+
- Removed `azure_data_cosmos::constants::SubStatusCode` and its `new`/`value`/`from_header_value`/`From`/`Display`/`Debug` API. The SDK no longer maintains a parallel sub-status-code type — fault-injection (the only remaining consumer) now uses `azure_data_cosmos_driver::models::SubStatusCode` directly. Callers that referenced the SDK type should switch to the driver re-export.
16+
1217
### Bugs Fixed
1318

1419
- Fixed `CosmosClientBuilder::with_user_agent_suffix` not propagating the suffix to data-plane requests. The suffix was only applied to the SDK's account-metadata pipeline; requests issued through the driver transport pipeline (the vast majority of operations) had a `User-Agent` header without the configured suffix. The suffix is now forwarded to `CosmosDriverRuntimeBuilder` so it appears on every outgoing request. ([#4368](https://github.com/Azure/azure-sdk-for-rust/pull/4368))

sdk/cosmos/azure_data_cosmos/Cargo.toml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,34 @@ url.workspace = true
3434
# footprint becomes a concern, move those tests to a dedicated crate gated on
3535
# the same feature instead of trying to gate the dev-dep here.
3636
[dev-dependencies]
37+
# Re-declare the driver here with the internal test-only diagnostics-construction feature.
38+
# Putting it in dev-dependencies (instead of [dependencies]) means downstream consumers
39+
# of `azure_data_cosmos` do NOT compile with this feature enabled — the driver's
40+
# `DiagnosticsContext::for_testing` constructor only exists when this crate's own
41+
# tests are being built.
42+
#
43+
# `default-features = false` is intentional: this declaration exists ONLY to opt
44+
# into `__internal_test_diagnostics_construction`. The "real" driver dependency
45+
# is declared in `[dependencies]` above with the production feature set; this
46+
# dev entry must NOT pull in additional default features that would silently
47+
# enable extra functionality only during tests. Cargo unions features across
48+
# dependency tables, so the production crate still gets its full feature set —
49+
# this entry only adds the internal test feature.
3750
azure_core_test = { workspace = true, features = ["tracing"] }
51+
azure_data_cosmos_driver = { workspace = true, default-features = false, features = [
52+
"__internal_test_diagnostics_construction",
53+
] }
3854
azure_identity = { version = "0.35.0" }
3955
clap.workspace = true
4056
reqwest = { workspace = true, features = ["http2"] }
4157
serde = { workspace = true, features = ["derive"] }
4258
time.workspace = true
43-
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time", "test-util"] }
59+
tokio = { workspace = true, features = [
60+
"rt-multi-thread",
61+
"macros",
62+
"time",
63+
"test-util",
64+
] }
4465
tracing-subscriber = { workspace = true, features = ["env-filter", "fmt"] }
4566
uuid = { workspace = true, features = ["v4", "fast-rng"] }
4667

@@ -49,16 +70,28 @@ workspace = true
4970

5071
[features]
5172
default = ["hmac_rust", "reqwest", "rustls"]
52-
reqwest = ["dep:reqwest", "azure_core/reqwest", "azure_core/tokio", "azure_data_cosmos_driver/reqwest", "azure_data_cosmos_driver/tokio"]
73+
reqwest = [
74+
"dep:reqwest",
75+
"azure_core/reqwest",
76+
"azure_core/tokio",
77+
"azure_data_cosmos_driver/reqwest",
78+
"azure_data_cosmos_driver/tokio",
79+
]
5380
rustls = ["reqwest", "azure_data_cosmos_driver/rustls", "__tls"]
5481
native_tls = ["reqwest", "azure_data_cosmos_driver/native_tls", "__tls"]
5582
key_auth = [
5683
] # Enables support for key-based authentication (Primary Keys and Resource Tokens)
5784
hmac_rust = ["azure_core/hmac_rust"]
5885
hmac_openssl = ["azure_core/hmac_openssl"]
59-
fault_injection = ["azure_data_cosmos_driver/fault_injection"] # Enables support for fault injection testing
60-
__internal_in_memory_emulator = ["azure_data_cosmos_driver/__internal_in_memory_emulator", "key_auth"]
61-
allow_invalid_certificates = [] # Enables accepting invalid TLS certificates (e.g., for emulator testing). Must be combined with a TLS feature (`rustls` or `native_tls`).
86+
fault_injection = [
87+
"azure_data_cosmos_driver/fault_injection",
88+
] # Enables support for fault injection testing
89+
__internal_in_memory_emulator = [
90+
"azure_data_cosmos_driver/__internal_in_memory_emulator",
91+
"key_auth",
92+
]
93+
allow_invalid_certificates = [
94+
] # Enables accepting invalid TLS certificates (e.g., for emulator testing). Must be combined with a TLS feature (`rustls` or `native_tls`).
6295
__tls = []
6396

6497
[package.metadata.docs.rs]

0 commit comments

Comments
 (0)