Support read consistency in Gateway V2 emulator - #5178
Closed
Simon Moreno (simorenoh) with Copilot wants to merge 3 commits into
Closed
Support read consistency in Gateway V2 emulator#5178Simon Moreno (simorenoh) with Copilot wants to merge 3 commits into
Simon Moreno (simorenoh) with Copilot wants to merge 3 commits into
Conversation
|
Azure Pipelines: 4 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: simorenoh <30335873+simorenoh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Gateway V2 live tests for PATCH method
Support read consistency in Gateway V2 emulator
Aug 28, 2026
Simon Moreno (simorenoh)
marked this pull request as ready for review
August 28, 2026 14:40
|
Azure Pipelines: Successfully started running 1 pipeline(s). 3 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Gateway V2 emulator support for read consistency strategies, resolving PATCH failures caused by LatestCommitted.
Changes:
- Accepts supported RNTBD strategy values
0x01–0x04. - Rejects unknown values and conflicting consistency tokens.
- Adds validation tests for these cases.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Tomas Varon (tvaron3)
approved these changes
Aug 28, 2026
Fabian Meiswinkel (FabianMeiswinkel)
requested changes
Aug 28, 2026
Fabian Meiswinkel (FabianMeiswinkel)
left a comment
Member
There was a problem hiding this comment.
One blocking issue
Decode validated RNTBD strategy bytes back to the driver enum and preserve the strategy on the translated emulator request. Expand Gateway V2 coverage to assert every supported strategy is forwarded while retaining invalid-value and conflicting-token validation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 93397907-0419-4fd2-9cb8-6334252e6085
Member
|
/azp run rust - cosmos - weekly |
Simon Moreno (simorenoh)
requested a review
from Fabian Meiswinkel (FabianMeiswinkel)
August 28, 2026 18:57
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
ananth7592
approved these changes
Sep 1, 2026
Ashley Stanton-Nurse (analogrelay)
approved these changes
Sep 1, 2026
Member
|
Closed by #5196 |
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.
PATCH's internal read uses
LatestCommitted, which is serialized for Gateway V2 as an RNTBDReadConsistencyStrategytoken. The hosted emulator now validates and preserves that intent when translating the request instead of rejecting or dropping it.RNTBD handling
ReadConsistencyStrategyvalues0x01-0x04.x-ms-cosmos-read-consistency-strategyheader on the translated request.ConsistencyLevelandReadConsistencyStrategy.Coverage
Fixes #5177