Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Bucket.delete_blobs drops 'generation' #814

Closed

Description

@jimdigriz

Whilst iterating the list, generation is dropped in the call to Bucket.delete_blob() (if Blob is passed in it should be a passthrough) resulting in much gnashing of teeth...

for blob in blobs:
try:
blob_name = blob
if not isinstance(blob_name, str):
blob_name = blob.name
self.delete_blob(
blob_name,
client=client,
if_generation_match=next(if_generation_match, None),
if_generation_not_match=next(if_generation_not_match, None),
if_metageneration_match=next(if_metageneration_match, None),
if_metageneration_not_match=next(if_metageneration_not_match, None),
timeout=timeout,
retry=retry,
)
except NotFound:
if on_error is not None:
on_error(blob)
else:
raise

Activity

  1. added
    api: storage
    on Jun 10, 2022
  2. added
    triage me
    on Jun 11, 2022
  3. added
    type: bug
    priority: p2
    and removed
    triage me
    on Jun 13, 2022
  4. self-assigned this
    on Jun 14, 2022
  5. added
    status: investigating
    and removed
    status: investigating
    on Jun 14, 2022
  6. added
    🚨
    and removed
    🚨
    on Jun 15, 2022
  7. added
    type: feature request
    priority: p3
    and removed
    type: bug
    priority: p2
    on Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: storagepriority: p3type: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions