cosmos: fix build failure from simultaneous merge#4626
Merged
Conversation
Pilchie
approved these changes
Jun 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the main branch build break caused by two PRs merging with API surface changes in the Cosmos driver runtime/options. It updates Cosmos driver tests to use the post-#4588/#4590 APIs (notably create_driver and the new partition failover option types).
Changes:
- Update integration tests to construct drivers via
runtime.create_driver(DriverOptions)instead of the removed/renamedget_or_create_driver(...)API. - Update unit-test routing helpers to use
PartitionFailoverOptions(and its accessor methods) instead ofPartitionFailoverConfig. - Remove now-invalid per-operation PPCB threshold settings from a test helper (requires follow-up adjustment so PPCB tests still trip the circuit as intended).
Show a summary per file
| File | Description |
|---|---|
| sdk/cosmos/azure_data_cosmos_driver/tests/multi_region_failover.rs | Switches driver construction to runtime.create_driver(DriverOptions) in live multi-region failover coverage. |
| sdk/cosmos/azure_data_cosmos_driver/tests/in_memory_emulator_tests/topology_refresh_on_substatus.rs | Updates emulator topology-refresh tests to use create_driver with DriverOptions. |
| sdk/cosmos/azure_data_cosmos_driver/tests/in_memory_emulator_tests/regional_gateway_unreachable.rs | Updates emulator fixture to use create_driver; removes obsolete per-operation PPCB threshold fields (needs driver-level replacement). |
| sdk/cosmos/azure_data_cosmos_driver/src/driver/pipeline/operation_pipeline.rs | Updates routing unit tests to use PartitionFailoverOptions and new threshold accessors. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 2
a1e6cf6 to
6775382
Compare
kundadebdatta
approved these changes
Jun 18, 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.
PRs #4588 and #4590 had "semantic" merge conflicts. They didn't actually conflict with each other at the diff level, but new tests added by #4590 used APIs that #4588 renamed or moved. Because we don't enforce up-to-date branches before merge, they both landed in main and broke it.
This PR resolves that conflict and fixes the tests from #4590 to use the correct APIs.