Skip to content

[1.2] Expose pending throughput replacement in structured output - #325

Merged
Mike Krüger (mkrueger) merged 2 commits into
rel/1.2from
dev/mkrueger/backport/1.2-318
Dec 1, 2026
Merged

Mike Krüger (mkrueger) merged 2 commits into
rel/1.2from
dev/mkrueger/backport/1.2-318

Conversation

@mkrueger

Copy link
Copy Markdown
Collaborator

Backport of #318 to rel/1.2, including the review follow-up.

  • Expose service-reported isReplacePending in structured CLI and MCP throughput results for database and container operations on data-plane and ARM connections.
  • Preserve missing or unrecognized values as null; dry runs report the observed state only under current.
  • Replace the nullable-boolean test switch with equivalent conditional logic to address the code-quality findings.

Keep this in draft until #318 merges into main.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit 84d1fb9)

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.

🟢 Approval recommended

No active review issues were identified for the throughput replacement-status output backport.

No open issues 🎉

What changed in this PR

Backports #318 to rel/1.2, exposing service-reported throughput replacement status in structured CLI and MCP output for database and container operations.

Changes:

  • Adds nullable isReplacePending status for data-plane and ARM connections, preserving missing or unrecognized values as null.
  • Reports observed status in read/write results and only under current for dry runs.
  • Documents the output contract and adds regression tests using conditional nullable-boolean assertions.
File Description
docs/​mcp.md Documents replacement status in MCP throughput results.
docs/​commands.md Explains status values and dry-run placement.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​ThroughputView.cs Adds the nullable replacement-status field.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​DataPlaneCosmosResourceOperations.cs Safely parses the data-plane response header.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​ArmCosmosResourceOperations.cs Parses the ARM replacement-status value.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Commands/​ThroughputCommand.cs Includes status in structured results and dry-run current state.
CosmosDBShell.Tests/​CommandTests/​ThroughputReplacementStatusTests.cs Tests CLI/MCP status output across both connection routes.

Review effort: Balanced

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

rel/1.2 39b7be3 dev/mkrueger/backpor... f4abc47 +/-
76% 77% +1%
View coverage of the 10 most impacted files.
File rel/1.2 39b7be3 dev/mkrueger/backpor... f4abc47 +/-
D:\a\CosmosDBSh...atchExecutor.cs 68% 17% -51%
D:\a\CosmosDBSh...eItemCommand.cs 79% 60% -19%
D:\a\CosmosDBSh...hell\Program.cs 85% 83% -2%
D:\a\CosmosDBSh...ThemeCommand.cs 73% 72% -1%
D:\a\CosmosDBSh...lInterpreter.cs 81% 80% -1%
D:\a\CosmosDBSh...ceOperations.cs 57% 71% +14%
D:\a\CosmosDBSh...elcomeScreen.cs 81% 96% +15%
D:\a\CosmosDBSh...ceOperations.cs 5% 28% +23%
D:\a\CosmosDBSh...ghputCommand.cs 23% 64% +41%
D:\a\CosmosDBSh...roughputView.cs 0% 90% +90%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@mkrueger
Mike Krüger (mkrueger) marked this pull request as ready for review December 1, 2026 12:27
@mkrueger
Mike Krüger (mkrueger) merged commit 92f10fe into rel/1.2 Dec 1, 2026
6 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/backport/1.2-318 branch December 1, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants