Skip to content

Expose pending throughput replacement in structured output - #318

Merged
Mike Krüger (mkrueger) merged 3 commits into
mainfrom
dev/mkrueger/fix/314-throughput-replacement-status
Dec 1, 2026
Merged

Mike Krüger (mkrueger) merged 3 commits into
mainfrom
dev/mkrueger/fix/314-throughput-replacement-status

Conversation

@mkrueger

@mkrueger Mike Krüger (mkrueger) commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #314.

Summary

  • Expose the service-reported isReplacePending in structured CLI and MCP throughput results for databases and containers on both the data-plane and Azure Resource Manager routes.
  • Preserve missing or unrecognized values as null. Write results report the state from the write response without inferring completion, and dry runs report it only under current.
  • Update the CLI and MCP docs and add regression coverage for pending, completed, unavailable, and malformed states.

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 remain for the structured throughput replacement-status output changes.

No open issues 🎉

What changed in this PR

Addresses #314 by exposing service-reported throughput replacement status in structured CLI and MCP output across data-plane and Azure Resource Manager connections.

Changes:

  • Adds nullable isReplacePending to throughput read and write results, preserving missing or unrecognized values as null.
  • Includes the observed status only under current in dry-run output, without implying write completion.
  • Adds regression coverage and documents the status semantics for CLI and MCP users.
File Description
docs/​mcp.md Documents replacement status in MCP throughput results.
docs/​commands.md Explains status values, completion limits, and dry-run behavior.
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 pending-status header.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Core/​ArmCosmosResourceOperations.cs Projects ARM replacement status into the shared view.
CosmosDBShell/​Azure.Data.Cosmos.Shell.Commands/​ThroughputCommand.cs Includes status in structured results and dry-run current state.
CosmosDBShell.Tests/​CommandTests/​ThroughputReplacementStatusTests.cs Covers status projection and CLI/MCP output across both backends.

Review effort: Balanced

@github-code-quality

github-code-quality Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: C#

C# / code-coverage/dotnet

main 39b7be3 dev/mkrueger/fix/314... 84d1fb9 +/-
76% 77% +1%
View coverage of the 8 most impacted files.
File main 39b7be3 dev/mkrueger/fix/314... 84d1fb9 +/-
D:\a\CosmosDBSh...osmosCommand.cs 81% 81% 0%
D:\a\CosmosDBSh...urceProvider.cs 65% 66% +1%
D:\a\CosmosDBSh...sourceFacade.cs 77% 85% +8%
D:\a\CosmosDBSh...ceOperations.cs 57% 71% +14%
D:\a\CosmosDBSh...ceOperations.cs 5% 28% +23%
D:\a\CosmosDBSh...ghputCommand.cs 23% 64% +41%
D:\a\CosmosDBSh...roughputView.cs 0% 90% +90%
D:\a\CosmosDBSh...ughputUpdate.cs 0% 100% +100%

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


Updated December 01, 2026 10:55 UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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

There are no active review issues for the throughput replacement-status change.

No open issues 🎉

Review effort: Balanced

@mkrueger
Mike Krüger (mkrueger) merged commit 3fa5a1c into main Dec 1, 2026
13 checks passed
@mkrueger
Mike Krüger (mkrueger) deleted the dev/mkrueger/fix/314-throughput-replacement-status branch December 1, 2026 12:26
Mike Krüger (mkrueger) added a commit that referenced this pull request Dec 1, 2026
* Expose pending throughput replacement in structured output

Refs #314

(cherry picked from commit 74b771d)

* Avoid constant-condition findings in throughput status tests (#318)

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

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Expose pending throughput replacement state in structured output

3 participants