Skip to content

Adding a retry for storage list_blobs(). - #2252

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:storage-eventual-consistency-list
Sep 7, 2016
Merged

Adding a retry for storage list_blobs().#2252
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:storage-eventual-consistency-list

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

The storage API is not guaranteed to be strongly consistent, so we retry to allow for eventual consistency.

Came up in https://travis-ci.org/GoogleCloudPlatform/gcloud-python/builds/157997410

@dhermesdhermes added api: storage Issues related to the Cloud Storage API. testing flaky labels Sep 6, 2016
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 6, 2016
@tseaver

Copy link
Copy Markdown
Contributor

LGTM

@dhermes

Copy link
Copy Markdown
ContributorAuthor

I'm going to hold off merging this until #2223 is in.

@dhermesdhermes added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 6, 2016
The storage API is not guaranteed to be strongly
consistent, so we retry to allow for eventual
consistency.
@dhermes
dhermesforce-pushed the storage-eventual-consistency-list branch from 4e8c9cc to fe2b6dbCompareSeptember 7, 2016 17:39
@dhermesdhermes removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 7, 2016
@dhermes
dhermes merged commit 570cf29 into googleapis:masterSep 7, 2016
@dhermes
dhermes deleted the storage-eventual-consistency-list branch September 7, 2016 22:29
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Sep 9, 2016
This is not just "taking the easy way out", it's really
the most appropriate fix since there are so many
assertions that can fail due to eventual consistency. (For
example, asking for 2 blobs should have a next page when 3
are in the bucket, but this may break down due to eventual
consistency.)
Fixesgoogleapis#2217.
Also
- restoring test_second_level() to pre-googleapis#2252 (by retrying
the entire test case)
- restoring test_list_files() to pre-googleapis#2181 (by retrying
the entire test case)
- adding retries around remaining test cases that call
list_blobs(): test_root_level_w_delimiter(),
test_first_level() and test_third_level()
- adding a helper to empty a bucket in setUpClass() helper
(which also uses list_blobs()) in both TestStoragePseudoHierarchy
and TestStorageListFiles
dhermes added a commit to dhermes/google-cloud-python that referenced this pull request Sep 9, 2016
This is not just "taking the easy way out", it's really
the most appropriate fix since there are so many
assertions that can fail due to eventual consistency. (For
example, asking for 2 blobs should have a next page when 3
are in the bucket, but this may break down due to eventual
consistency.)
Fixesgoogleapis#2217.
Also
- restoring test_second_level() to pre-googleapis#2252 (by retrying
the entire test case)
- restoring test_list_files() to pre-googleapis#2181 (by retrying
the entire test case)
- adding retries around remaining test cases that call
list_blobs(): test_root_level_w_delimiter(),
test_first_level() and test_third_level()
- adding a helper to empty a bucket in setUpClass() helper
(which also uses list_blobs()) in both TestStoragePseudoHierarchy
and TestStorageListFiles
@dhermesdhermes mentioned this pull request Sep 19, 2016
parthea pushed a commit that referenced this pull request Nov 24, 2025
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Apr 1, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storageIssues related to the Cloud Storage API.cla: yesThis human has signed the Contributor License Agreement.testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@dhermes@tseaver@daspecster@googlebot