Fix Cosmos live and native test setup - #5379
Merged
Merged
Conversation
Probe AAD query authorization with a bounded readiness check while preserving persistent failures. Provision multiple partitions directly for merge coverage instead of waiting for an unrelated split. Complete the native mock topology change-feed protocol for eager container resolution. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 80fad27f-9c2a-4450-9ec6-a983d6d479e6
Member
Author
|
/azp run rust - cosmos - weekly |
|
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. |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The test-only changes are consistent, bounded, and adequately covered by deterministic tests.
Review effort: Balanced
Findings: None
What changed in this PR
Improves Cosmos live and native test reliability without production or ABI changes.
Changes:
- Adds bounded AAD query-authorization readiness retries and regression tests.
- Provisions merge tests with multiple initial partitions.
- Completes native mock partition-range responses with ETag/304 handling.
| File | Description |
|---|---|
cosmos_partition_merge.rs |
Starts merge testing with multiple partitions. |
cosmos_aad.rs |
Adds bounded query readiness handling and tests. |
test_abi.rs |
Completes mocked topology resolution responses. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Recover from resolver outages during SDK test client and database setup without replaying test bodies or weakening assertions. Preserve the last DNS error after a 30-second recovery window and leave fault-injected client construction unchanged. Cover resolver source classification, recovery, persistent errors, unrelated failures, and hanging retries with deterministic regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Integrate native feed cursors from upstream e59c94c. Resolve the ABI fixture conflict using upstream's ETag-driven topology change feed, preserving the AAD, partition-merge, and DNS-recovery test fixes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Remove the separate readiness probe, whose success cannot guarantee authorization of the subsequent query. Apply the existing bounded 403/5302 retry to query planning and pager consumption, leaving CRUD operations and result assertions outside the retry. Add regression coverage that discards partial query results before retry so returned items are not duplicated. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Extend bounded DNS recovery to container setup and database cleanup. Preserve the original test failure when cleanup also fails, while continuing to fail otherwise successful tests on cleanup errors. Exercise container creation and cleanup through the in-memory SDK with temporary DNS faults, and cover all test/cleanup error precedence combinations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Ashley Stanton-Nurse (analogrelay)
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
Fix test setup failures investigated in #5370 / weekly build 6895109 and subsequent live runs. No production behavior or ABI changes.
cosmos_aad.rs: apply a 30-second, 403/5302-only retry to the actual AAD query and full pager consumption, rather than a separate readiness probe. Preserve persistent RBAC failures and keep result assertions outside retries. Cover authorization, timeout, and partial-result handling with five deterministic regression tests.cosmos_partition_merge.rs: provision 13,000 RU/s and assert multiple physical partitions instead of waiting for an unrelated split; retain merge, routing, and continuation assertions.tests/framework/test_client.rs: recover from DNS outages observed in weekly builds 6897807 and 6903164 with a 30-second DNS-only retry window during client/database/container setup and resource cleanup. Preserve persistent errors, do not replay test bodies or fault-injected client construction, and retain the original test failure if cleanup also fails. Cover recovery boundaries, error precedence, and an in-memory SDK resource lifecycle with ten regression tests.The original native topology mock fix is now supplied by upstream #5334 and is no longer part of this PR's diff.