Repository navigation
cosmos operation options abi - #5366
Merged
Tomas Varon (tvaron3) merged 15 commits intoOct 1, 2026
Merged
Tomas Varon (tvaron3) merged 15 commits into
Tomas Varon (tvaron3) merged 15 commits into
Conversation
Merge upstream main through ebfe5bf while preserving runtime-shared container caches and native operation-option parity. Expose ABI 0.2.0 runtime defaults, atomic updates, full-width counts, and admission snapshots. Keep recovery refreshes on the admitted policy and retain completion-safe cancellation. Combine conditional macro fields with skipped internal state, adopt upstream API artifact paths, and make ETAG available to emulator tests without the distributed-transaction preview feature. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Add PR references to the driver and macro release notes, and remove unnecessary blank lines from the changelog and generated Default template. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve upstream API cleanup and binary RawValue support while replacing direct ExcludedRegions tuple construction with public builders and FromIterator. This resolves the shared E0423 failure blocking PR and live-test setup. Keep both upstream and PR-specific changelog entries. Preserve configuration snapshots and shared runtime container caches. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Adopt upstream error type unification and use the public status_codes::substatus timeout constant in native snapshots and deadline assertions. Preserve the existing 408/20008 status and snapshot behavior. Validate the combined upstream and PR source with the CI setup check, workspace Clippy, driver/native/macro tests, repository analysis and the C ABI suite. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate upstream native fault injection, account hedging suppression, and fallible EPK conversions while preserving admitted configuration snapshots and shared runtime caches. Resolve documentation conflicts, adapt the new refresh test callback, and complete the native fault-injection fixture's partition topology change feed with a terminal 304 response. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Public cancellation and option-encoding documentation is inconsistent, and one Rust call is not rustfmt-compliant.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Expands Cosmos native operation configuration while preserving admission-time behavior across retries, routing, initialization, and cancellation.
Changes:
- Adds
#[option(skip)]for internal layered-option state. - Introduces the breaking native ABI 0.2.0 operation options and admission snapshot APIs.
- Preserves operation policies through refreshes, routing, deadlines, and cancellation.
| File | Description |
|---|---|
Cargo.lock |
Updates the native crate version. |
sdk/cosmos/azure_data_cosmos_macros/CHANGELOG.md |
Records option(skip). |
sdk/cosmos/azure_data_cosmos_macros/README.md |
Documents skipped fields. |
sdk/cosmos/azure_data_cosmos_macros/src/builder.rs |
Omits setters for skipped fields. |
sdk/cosmos/azure_data_cosmos_macros/src/lib.rs |
Documents and tests skipping. |
sdk/cosmos/azure_data_cosmos_macros/src/parse.rs |
Parses and validates skip. |
sdk/cosmos/azure_data_cosmos_macros/src/view.rs |
Omits skipped accessors. |
sdk/cosmos/azure_data_cosmos_macros/tests/derive_cosmos_options.rs |
Tests conditional skipped state. |
sdk/cosmos/azure_data_cosmos_driver/CHANGELOG.md |
Records routing and refresh fixes. |
sdk/cosmos/azure_data_cosmos_driver/src/driver/cosmos_driver.rs |
Propagates pinned throttle policies. |
sdk/cosmos/azure_data_cosmos_driver/src/driver/pipeline/operation_pipeline.rs |
Resolves TTL per operation. |
sdk/cosmos/azure_data_cosmos_driver/src/driver/routing/location_state_store.rs |
Applies operation-aware refresh options. |
sdk/cosmos/azure_data_cosmos_driver/src/in_memory_emulator/operations.rs |
Corrects feature-gated ETAG import. |
sdk/cosmos/azure_data_cosmos_driver/src/options/operation_options.rs |
Adds snapshots and TTL environment parsing. |
sdk/cosmos/azure_data_cosmos_driver_native/CMakeLists.txt |
Bumps pkg-config ABI version. |
sdk/cosmos/azure_data_cosmos_driver_native/Cargo.toml |
Bumps crate version to 0.2.0. |
sdk/cosmos/azure_data_cosmos_driver_native/README.md |
Documents ABI 0.2 behavior. |
sdk/cosmos/azure_data_cosmos_driver_native/api.md |
Updates exported API artifacts. |
sdk/cosmos/azure_data_cosmos_driver_native/build.rs |
Names the snapshot C type. |
sdk/cosmos/azure_data_cosmos_driver_native/c_tests/account_and_driver_options.c |
Exercises expanded options. |
sdk/cosmos/azure_data_cosmos_driver_native/c_tests/counted_strings.c |
Updates ABI layout assertions. |
sdk/cosmos/azure_data_cosmos_driver_native/c_tests/operation_construction.c |
Verifies ABI 0.2 defaults and layout. |
sdk/cosmos/azure_data_cosmos_driver_native/c_tests/runtime_lifecycle.c |
Tests runtime option replacement. |
sdk/cosmos/azure_data_cosmos_driver_native/include/azurecosmosdriver.h |
Exposes the revised C ABI. |
sdk/cosmos/azure_data_cosmos_driver_native/src/completion.rs |
Implements cancellation signaling. |
sdk/cosmos/azure_data_cosmos_driver_native/src/driver.rs |
Updates driver-cache documentation. |
sdk/cosmos/azure_data_cosmos_driver_native/src/lib.rs |
Exports snapshot APIs. |
sdk/cosmos/azure_data_cosmos_driver_native/src/op_request.rs |
Decodes expanded operation options. |
sdk/cosmos/azure_data_cosmos_driver_native/src/options_snapshot.rs |
Implements admission snapshots. |
sdk/cosmos/azure_data_cosmos_driver_native/src/options_snapshot/submit_tests.rs |
Tests snapshot submission semantics. |
sdk/cosmos/azure_data_cosmos_driver_native/src/runtime.rs |
Updates runtime ownership documentation. |
sdk/cosmos/azure_data_cosmos_driver_native/src/runtime_builder.rs |
Accepts runtime operation defaults. |
sdk/cosmos/azure_data_cosmos_driver_native/src/submit.rs |
Applies snapshots and cancellation. |
sdk/cosmos/azure_data_cosmos_driver_native/src/test_abi.rs |
Improves mock topology responses. |
Restore reserved cancellation outcomes and await driver completion instead of dropping in-flight work that can lose diagnostics. Remove the cancellation API and test, and regenerate the native header and API listing. Clarify tri-state and explicit-empty option encoding in op_request.rs and the README, and correct metadata-request argument indentation in cosmos_driver.rs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate upstream feed cursors and the Cosmos beta release while retaining native ABI 0.2.0, shared runtime caches, and removed host cancellation. Carry admission snapshots through cursor planning and page execution, reject snapshots from other runtimes, and cover expiry across cursor lifetime. Keep unreleased PR notes separate from released upstream entries. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate upstream Cosmos beta.2 versions, API generation tooling, and escaped error-message decoding. Keep this PR's driver and macro changelog entries in the new 1.0.0-beta.2 Unreleased sections without altering released entries. Preserve native ABI 0.2.0 and align local driver dependencies with the upstream beta.2 versions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Start maintained native release history at 0.2.0 and document the operation-options ABI additions and pre-1.0 compatibility boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: dc991c8a-81db-439a-a4e2-03b45107a0c5
ananth7592
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Expose the remaining shared Cosmos operation options through the native C ABI so language bindings can use the Rust configuration hierarchy without duplicating retry, routing, or hedging policies.
cosmos_operation_options_twith throughput bucket/priority, throttling retry count/wait, hedging enablement, and availability strategy/threshold. Support the completeuint32_tfailover/session retry range and explicit-empty excluded regions.#[option(skip)]support toCosmosOptions, compatible with conditional fields; update generated headers/API artifacts, documentation, and regression coverage. Also fix the upstream emulator tests' feature-gatedETAGimport.