-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Image Copy] Fix snapshot create issue #1172
Conversation
If this PR is for a new extension or change to an existing extension, use the following to try out the changes in this PR:
|
if target_subscription: | ||
subscription_id = target_subscription | ||
else: | ||
subscription_id = get_subscription_id(cmd.cli_ctx) |
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.
is this original service behavior? otherwise, pls help to document the behavior.
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.
The goal of this PR is to infer storage account ID. If target_subscription is None, use the default subscription.
Code that creates storage account.
cli_cmd = prepare_cli_command(['storage', 'account', 'create',
'--name', target_storage_account_name,
'--resource-group', transient_resource_group_name,
'--location', location,
'--sku', 'Standard_LRS'],
subscription=target_subscription)
the scenario: no specifying target_subscription is covered by test, right? and it doesn't fail because run only in recorded way, but not live run, right? |
This issue is caused by a breaking change in service. There is no automatic testing in this module. I test manually. I made the minimal change to fix issue 11625. "target_subscription" is not the focus of this issue and PR. |
fix typo. |
OK. I can add a test case for this PR although there is no testing in this module now. |
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.
LGTM.
* [Image Copy]Fix issue 11625 * Add test case
This issue is due to a breaking change of snapshot service. The service changed a parameter (source storage account ID) from optional to mandatory recently. This PR infers source storage account ID automatically to fix this issue. Breaking change is catastrophic.
Fix issue Azure/azure-cli#11625
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally?For new extensions: