You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dandhlee helped point out a weirdness in the rpo_test in our recent turbo replication change, that was copied over from snippets_test.
Just want to highlight this here to ensure we take a look and also to inquire if someone knows if there's a reason why we did it this way.
As dan pointed out, if the bucket exists, an infinite loop would be created, and so I'm kind of confused about what's happening here.
I recall this is to ensure that the bucket fixture created has a non-existent bucket_name
while bucket is None or bucket.exists():
bucket_name = "storage-snippets-test-{}".format(uuid.uuid4())
bucket = storage.Client().bucket(bucket_name)
The while loop is broke out once bucket_name = "storage-snippets-test-{}".format(uuid.uuid4()) is non-existent and unique, so there wouldn't be an infinite loop.
@dandhlee helped point out a weirdness in the rpo_test in our recent turbo replication change, that was copied over from snippets_test.
Just want to highlight this here to ensure we take a look and also to inquire if someone knows if there's a reason why we did it this way.
As dan pointed out, if the bucket exists, an infinite loop would be created, and so I'm kind of confused about what's happening here.
https://github.com/googleapis/python-storage/blob/main/samples/snippets/snippets_test.py#L106
https://github.com/googleapis/python-storage/blob/main/samples/snippets/snippets_test.py#L121
https://github.com/googleapis/python-storage/blob/main/samples/snippets/snippets_test.py#L154
#622
The text was updated successfully, but these errors were encountered: