Skip to content
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

Option to allow delete_blob for blob versions #13527

Closed
kgopi05 opened this issue Sep 2, 2020 · 6 comments · Fixed by #14051
Closed

Option to allow delete_blob for blob versions #13527

kgopi05 opened this issue Sep 2, 2020 · 6 comments · Fixed by #14051
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Docs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)

Comments

@kgopi05
Copy link

kgopi05 commented Sep 2, 2020

Hi,

Recently Blob versions is enabled for GA , Hence we need option to enable lifecycle policies for Blob versions and python client delete_blob to allow versions only .

https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.containerclient?view=azure-python#delete-blobs--blobs----kwargs-

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 2, 2020
@kaerm kaerm added Client This issue points to a problem in the data-plane of the library. Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Sep 3, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Sep 3, 2020
@ghost
Copy link

ghost commented Sep 3, 2020

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@xiafu-msft
Copy link
Contributor

Hi @kgopi05

Thanks for reaching out.
For blob_client.delete_blob, you can specify version_id parameter https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob

for delete_blobs it seems currently you cannot batch delete blob versions, we will double check and see if we are missing adding that to delete_blobs.

Hi @scbedd can you help take a look at the doc https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#delete-blob-delete-snapshots-false----kwargs-
it's missing some kwargs, here's how the api should look like https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob

@xiafu-msft xiafu-msft added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Sep 14, 2020
@ghost ghost added the no-recent-activity There has been no recent activity on this issue. label Sep 21, 2020
@ghost
Copy link

ghost commented Sep 21, 2020

Hi, we're sending this friendly reminder because we haven't heard back from you in a while. We need more information about this issue to help address it. Please be sure to give us your input within the next 7 days. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

@kgopi05
Copy link
Author

kgopi05 commented Sep 21, 2020

Hi @kgopi05

Thanks for reaching out.
For blob_client.delete_blob, you can specify version_id parameter https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob

i'm unable to see the version_id in the blob parameters list , can you refer the right documentation link please ?

for delete_blobs it seems currently you cannot batch delete blob versions, we will double check and see if we are missing adding that to delete_blobs.

Hi @scbedd can you help take a look at the doc https://docs.microsoft.com/en-us/python/api/azure-storage-blob/azure.storage.blob.blobclient?view=azure-python#delete-blob-delete-snapshots-false----kwargs-
it's missing some kwargs, here's how the api should look like https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.ContainerClient.delete_blob

@ghost ghost added needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team and removed needs-author-feedback Workflow: More information is needed from author to address the issue. no-recent-activity There has been no recent activity on this issue. labels Sep 21, 2020
@xiafu-msft
Copy link
Contributor

Hi @kgopi05

Sorry I was looking at BlobClient.delete_blob() which is this https://azuresdkdocs.blob.core.windows.net/$web/python/azure-storage-blob/12.4.0/azure.storage.blob.html#azure.storage.blob.BlobClient.delete_blob

Please use this as reference, the doc for ContainerClient.delete_blob() is not accurate enough! Thanks for helping catch this, we will post a pr in a bit

@xiafu-msft xiafu-msft added Docs bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 24, 2020
@tasherif-msft tasherif-msft self-assigned this Sep 24, 2020
@tasherif-msft
Copy link
Contributor

Hey @kgopi05 I have just put up a PR to fix the docstrings for ContainerClient :)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Docs needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants