-
Notifications
You must be signed in to change notification settings - Fork 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
Misbehaving --dryrun
flag in az storage blob delete-batch
#5575
Comments
The parameters are used to limit the operations according to whether the resource has been modified or not.
|
@williexu This is pretty bad in two ways:
|
@seguler If we want to do this, it would have to be done through server support for batch-commands. |
Hello, |
@arbaiti if you still need an example:
|
Changing this issue to a service attention feature, as the CLI can only do so much to facilitate a dry-run if the service does not support this option. |
Hi, |
Any update here? @amishra-dev |
Hi @Juliehzl, please correct me if I'm wrong, does the If yes, I would suggest to implement this feature on the client side, since the last-modified-time of each blob is available and the dry run can make the comparison. AFAIK, no dry run command exists on the service end, and there doesn't seem to be any such plan. |
@zezha-msft you are really right. But for the list operations, list_blobs in SDK doesn't accept precondition arguments, such as if_modified_since. |
Hi @Juliehzl, the last-modified-time is returned for every blob with listing operations, so the comparison can be made on the client side. Example:
|
It doesn't make much sense for the service to provide a dry-run operation, since the same result is also not guaranteed when the user eventually makes the real call. Example:
The service cannot provide any additional guarantee than the client side, so I see no reason why dry-run has to be done on the service side. |
move to S166. |
(Ubuntu, azure-cli 2.0.27, and showing storage as 2.0.25.)
I've tried playing with the new
delete-batch
, and could not figure outhow to use
--if-modified-since
or--if-unmodified-since
-- no matterwhat I did, it seems to always insist on deleting everything. After
lots of fiddling around, I used a new container just to experiment with,
and to my surprise, it looks like
--dryrun
just ignores these flags,but when it's not used, there are not ignored (but have other, unrelated
issues).
If this is correct then this is a very bad problem, since it is common
to use a dry run flag to see what will be deleted, and ignoring these
flags means that I can end up deleting blobs unexpectedly.
The text was updated successfully, but these errors were encountered: