Repository navigation
Preserve full-text policy metadata in container info - #315
Mike Krüger (mkrueger) wants to merge 4 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the full-text policy metadata changes.
No open issues 🎉
What changed in this PR
This PR addresses #313 by preserving complete full-text policy metadata in container info results across data-plane and Azure Resource Manager connections.
Changes:
- Adds
fullTextPolicyDetailsto structured CLI and MCP output while preserving the existingfullTextPolicypath array. - Projects ARM full-text policy metadata, including the default language and path/language entries.
- Adds regression tests and documentation covering backend parity, absent and empty policies, and metadata-read failures.
| File | Description |
|---|---|
docs/commands.md |
Documents the complete policy field, compatibility, and absence/error behavior. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Core/ArmCosmosResourceOperations.cs |
Maps ARM full-text policy metadata into the shared container settings view. |
CosmosDBShell/Azure.Data.Cosmos.Shell.Commands/InfoCommand.cs |
Adds complete policy details while retaining the legacy path-array field. |
CosmosDBShell.Tests/CommandTests/FullTextPolicyReadbackTests.cs |
Tests policy preservation, CLI/MCP consistency, and read failures across both backends. |
Review effort: Balanced
Code coverage overviewLanguages: C# C# / code-coverage/dotnet
View coverage of the 10 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
| } | ||
|
|
||
| mcpTable["fullTextPolicy"] = mcpPaths; | ||
| mcpTable["fullTextPolicyDetails"] = new Dictionary<string, object?> |
There was a problem hiding this comment.
Do we really need a new entry for this? I think it's fine to break the contract, it should be just documented in the changelog and we should bump the minor version.
There was a problem hiding this comment.
Fixed - it's now in the fullTextPolicy object but it's not longer an array.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #313.
Container
infonow exposes the observed default language and all full-text path/language entries on both data-plane and Azure Resource Manager connections.fullTextPolicyobject withdefaultLanguageandfullTextPaths. No separatefullTextPolicyDetailsfield is emitted.fullTextPolicy: null; failed or unsupported metadata reads return an error instead. Configured policies without paths return an emptyfullTextPathsarray.fullTextPolicywas previously a path array. Fixed JSON consumers should now iteratefullTextPolicy.fullTextPaths.Validation