Skip to content

cosmos: fix build failure from simultaneous merge#4626

Merged
kundadebdatta merged 1 commit into
Azure:mainfrom
analogrelay:ashleyst/cosmos-build-fix
Jun 18, 2026
Merged

cosmos: fix build failure from simultaneous merge#4626
kundadebdatta merged 1 commit into
Azure:mainfrom
analogrelay:ashleyst/cosmos-build-fix

Conversation

@analogrelay

Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings June 18, 2026 17:48
@analogrelay analogrelay requested a review from a team as a code owner June 18, 2026 17:48
@github-actions github-actions Bot added the Cosmos The azure_cosmos crate label Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/renamed get_or_create_driver(...) API.
  • Update unit-test routing helpers to use PartitionFailoverOptions (and its accessor methods) instead of PartitionFailoverConfig.
  • 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

@FabianMeiswinkel FabianMeiswinkel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@analogrelay analogrelay force-pushed the ashleyst/cosmos-build-fix branch from a1e6cf6 to 6775382 Compare June 18, 2026 18:22
@kundadebdatta kundadebdatta enabled auto-merge (squash) June 18, 2026 18:32
@kundadebdatta kundadebdatta merged commit d1d7862 into Azure:main Jun 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cosmos The azure_cosmos crate

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants