-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Storage] Fix #21414: az storage blob sync
: Fix the flag --delete-destination
default to false
#21662
Conversation
…ation default to false
Thank you for your contribution jonie001! We will review the pull request and get back to you soon. |
Storage bug fix |
az storage blob sync
:Fix the flag --delete-destination
default to falseaz storage blob sync
: Fix the flag --delete-destination
default to false
Changing the default value is breaking change. How about add a parameter |
…zure-cli into fix_storage_blob_sync
@@ -1256,6 +1259,7 @@ def load_arguments(self, _): # pylint: disable=too-many-locals, too-many-statem | |||
c.argument('source', options_list=['--source', '-s'], | |||
help='The source file path to sync from.') | |||
c.ignore('destination') | |||
c.argument('delete_destination', delete_destination_type) |
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.
Try to use get_three_state_flag
arg type
@@ -81,10 +81,14 @@ def storage_fs_directory_copy(cmd, source, destination, recursive=None, **kwargs | |||
azcopy.copy(source, destination, flags=flags) | |||
|
|||
|
|||
def storage_blob_sync(cmd, client, source, destination, exclude_pattern=None, include_pattern=None, | |||
exclude_path=None): | |||
def storage_blob_sync(cmd, client, source, destination, delete_destination=None, exclude_pattern=None, |
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.
def storage_blob_sync(cmd, client, source, destination, delete_destination=None, exclude_pattern=None, | |
def storage_blob_sync(cmd, client, source, destination, delete_destination=True, exclude_pattern=None, |
In this way, default=True
will automatically show in help message
src/azure-cli/azure/cli/command_modules/storage/operations/azcopy.py
Outdated
Show resolved
Hide resolved
az storage blob sync
: Fix the flag --delete-destination
default to falseaz storage blob sync
: Fix the flag --delete-destination
default to false
…ation default to false
Description
Fix #21414
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis 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.