-
Notifications
You must be signed in to change notification settings - Fork 342
Decouple azure_data_cosmos_driver from azure_core dependency #3845
Copy link
Copy link
Closed
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosThe azure_cosmos crateThe azure_cosmos crate
Description
Summary
The azure_data_cosmos_driver crate currently depends on azure_core for HTTP infrastructure, credentials, error types, and utilities. Per the multi-crate versioning strategy, the driver should be independently versionable. The azure_core dependency creates version coupling — breaking changes in azure_core force driver major version bumps even when the driver's own API is stable.
Proposal
Create a new azure_core_shared crate under sdk/core/ that contains:
- Re-exports of only the HTTP primitive types the driver needs from
typespec_client_core(Request, Response, Method, StatusCode, Headers, Policy, Transport, Context, etc.) - Credentials (Secret, TokenCredential, AccessToken, TokenRequestOptions) — moved from
azure_core::credentials - HMAC (hmac_sha256) — moved from
azure_core::hmac
azure_core would re-export from the new crate, so existing consumers are unaffected.
Motivation
- ~90% of what the driver uses from
azure_coreoriginates intypespec/typespec_client_core(re-exports) - Only credentials and HMAC are truly
azure_core-specific typespec_client_coreitself includes unused functionality (retry policies, pipeline builder, streaming, etc.)- The driver is consumed by
azure_data_cosmos_native(C FFI for Java/.NET/Python SDKs) — minimizing deps reduces cross-language complexity
Spec
See: refactor-azure-core-dependency-spec.md
Originally tracked in: Azure/azure-sdk-for-python#45463
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosThe azure_cosmos crateThe azure_cosmos crate
Type
Projects
Status
Done
Status
Done