Conversation
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR adds support for Microsoft Fabric workspace resource IDs in the --network-acl-bypass-resource-ids parameter for the az cosmosdb update command. The change extends the existing validation to accept not only standard Azure resource IDs (starting with /subscriptions/) but also Fabric-specific resource IDs that begin with /tenants/ and follow a specific format.
Changes:
- Added a new validation function
is_valid_network_acl_bypass_resource_id()with a helper_is_valid_guid()to validate both standard Azure and Fabric resource ID formats - Updated
cli_cosmosdb_update()to use the new validator instead of the genericis_valid_resource_id()function - Added integration test
test_cosmosdb_network_acl_bypass()to verify the new functionality
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/cosmosdb/_validators.py | Adds new validation functions for network ACL bypass resource IDs with support for Fabric workspace format |
| src/azure-cli/azure/cli/command_modules/cosmosdb/custom.py | Updates the update command to use the new Fabric-aware validator |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/test_cosmosdb_commands.py | Adds integration test covering both standard Azure and Fabric resource ID formats |
| src/azure-cli/azure/cli/command_modules/cosmosdb/tests/latest/recordings/test_cosmosdb_network_acl_bypass.yaml | Test recording file for the new test case |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
az cosmosdb update -n {acc} -g {rg} --network-acl-bypass AzureServices --network-acl-bypass-resource-ids /tenants/{tenantId}/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fabric/providers/Microsoft.Fabric/workspaces/{workspaceGuid}
Description
This PR adds support for Microsoft Fabric workspace resource IDs in the
--network-acl-bypass-resource-idsparameter foraz cosmosdb update.Previously, only standard Azure resource IDs (starting with
/subscriptions/) were accepted. This change extends validation to also accept Fabric resource IDs in the format:/tenants/{tenantId}/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Fabric/providers/Microsoft.Fabric/workspaces/{workspaceGuid}Changes:
is_valid_network_acl_bypass_resource_id()function in_validators.pythat validates both standard Azure resource IDs and Fabric resource IDscli_cosmosdb_update()incustom.pyto use the new validation functionTesting Guide
History Notes
[CosmosDB]
az cosmosdb update: Add support for Microsoft Fabric workspace resource IDs in--network-acl-bypass-resource-idsThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.