Conversation
…16/azure-cli into user/iliu/keyvaultLocation
️✔️AzureCLI-FullTest
|
|
Hi @iliu816, |
️✔️AzureCLI-BreakingChangeTest
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug where the Azure Service Fabric cluster creation command would create the KeyVault in the resource group's location instead of the location specified by the --location parameter. The fix ensures that when creating certificates for clusters, the KeyVault is placed in the same location as the cluster.
- Modified the
_create_certificatefunction to accept a location parameter and use it for KeyVault placement - Updated all calls to
_create_certificateto pass the appropriate location - Added a new test case to verify the fix works when cluster location differs from resource group location
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/servicefabric/custom.py | Updated _create_certificate function signature to accept location parameter and modified all calling functions to pass the cluster location |
| src/azure-cli/azure/cli/command_modules/servicefabric/tests/latest/test_sf_cluster.py | Added new test case and updated existing tests to use generated passwords instead of hardcoded ones |
Comments suppressed due to low confidence (1)
src/azure-cli/azure/cli/command_modules/servicefabric/tests/latest/test_sf_cluster.py:33
- [nitpick] The test function name is quite verbose. Consider shortening it to 'test_create_cluster_different_location' which is still clear but more concise.
def test_create_cluster_with_location_different_from_resource_group(self):
|
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>
|
az sf cluster create keyVault not placed in location specifed by --locationaz sf cluster create: Fix the bug where key-vault not placed in location specifed by --location
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az sf cluster createDescription
Fix #5338 by changing the location of the KeyVault to match the location of the cluster instead of the location of the Resource Group.
This 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.