-
Notifications
You must be signed in to change notification settings - Fork 4k
[CosmosDB] Add throughputBucket feature to CosmosDB preview #27971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CosmosDB] Add throughputBucket feature to CosmosDB preview #27971
Conversation
… model with help messages
Modified maximum throughput percentages for two buckets in `Test-SqlThroughputCmdlets`. Added assertions to verify updated bucket properties. Removed the test for container throughput buckets and the associated function `Test-SqlThroughputBucketCmdlets`. Adjusted formatting in `Test-ClientEncryptionKeyCmdletsUsingInputObject` for clarity.
Modified the help message for the `MaxThroughputPercentage` parameter in `NewAzCosmosDBThroughputBucketObject.cs` for clarity. Restored two help message constants in `Constants.cs` related to throughput buckets and added a new constant to improve usability in Cosmos DB resource management.
Updated `Test-SqlThroughputCmdlets` in `SqlOperationsTests.ps1` to add assertions for `ThroughputBuckets`. The test now verifies the count of buckets and checks the `Id` and `MaxThroughputPercentage` for each bucket to ensure expected values are set correctly.
Corrected the parameter name from `-Name $AccountName` to `-AccountName $AccountName` in the `Update-AzCosmosDBSqlContainerThroughput` function calls within `SqlOperationsTests.ps1`. This change ensures proper parameter usage and consistency across test cases, including instances with empty `-ThroughputBuckets`.
Refactor throughput handling in Azure Cosmos DB management library. Introduce `PSThroughputBucket` class to replace `ThroughputBucketResource`. Modify `CreateThroughputSettingsObject` to accept an array of `PSThroughputBucket`. Update `ThroughputSettingsGetResults` to ensure consistent usage of the new type, improving type safety and aligning with the updated data model for throughput settings.
Introduced `New-AzCosmosDBThroughputBucketObject` cmdlet to create CosmosDB Throughput Bucket objects, complete with documentation updates for synopsis, syntax, and examples. Enhanced existing CosmosDB cmdlets to support a new `-ThroughputBuckets` parameter, allowing users to specify multiple throughput buckets for better resource management. Updated documentation for all affected cmdlets to reflect these changes.
Enhanced the synopsis and description for the command by replacing placeholder text with a specific description. Added an example to illustrate usage, demonstrating how to create a new throughput bucket object with parameters. The parameters section remains unchanged.
Updated the Azure Cosmos DB PowerShell module to replace all instances of "ThroughputBuckets" with "ThroughputBucketsObject". This change affects test scripts, helper classes, and model definitions, ensuring consistency in the API. Help messages related to these parameters have also been updated for clarity on throughput bucket usage in Cosmos DB operations.
…mmands Renamed `-ThroughputBuckets` to `-ThroughputBucketsObject` across multiple Azure CosmosDB command documentation files. This change clarifies the expected input type, indicating that the parameter accepts an array of `PSThroughputBucket` objects.
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
"New-AzCosmosDBSqlVectorEmbedding": {}, | ||
"New-AzCosmosDBSqlVectorEmbeddingPolicy": {}, | ||
"New-AzCosmosDBSqlVectorIndex": {}, | ||
"New-AzCosmosDBTable": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to update this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New command New-AzCosmosDBThroughputBucketObject has been added. This also orders the commands in alphabetical order which were previously not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not updated manually. Please remove the change on it.
@@ -51,7 +51,7 @@ public void TestCassandraMigrateThroughputCmdlets() | |||
TestRunner.RunTestScript("Test-CassandraMigrateThroughputCmdlets"); | |||
} | |||
|
|||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to skip this test? can we add it back?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was because 2 tests were failing only for linux and mac and we could not root cause why. The test is not related to changes made in this PR. CC: @pjohari-ms , @vidai-msft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YanaXu this test is in private preview, and was failing because the subscription required special features for it to work. Next release we will make it generic after enabling it across a few internal subscriptions.
Hi @pjohari-ms,
|
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Track the test issue with #28030 and merge this PR. |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.