Retry entire test_paginate_files() storage system test.#2293
Retry entire test_paginate_files() storage system test.#2293dhermes merged 1 commit intogoogleapis:masterfrom
Conversation
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.) Fixes googleapis#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, one thing I thought about the issue you mentioned with I also think you could stack |
|
@daspecster Thanks for the tip, though I was aware of that behavior already. The point of this is that the failures are quite complex and to really change them to be eventual-consistency-proof would be equivalent to decorating the entire method, so we might as well. |
|
I'm doubtful that wrapping the entire testcase is going to make us more robust than wrapping the individual |
|
@tseaver None of the wrapped tests call |
|
@tseaver Bump. This showed up again in: https://travis-ci.org/GoogleCloudPlatform/google-cloud-python/builds/160041019 |
Hmm? The all call I'm still dubious that we should assume any assertion failure in one of these tests is due to an eventual consistency error. |
|
@tseaver Regarding your doubt:
|
|
I'll acquiesce, but still think we'd be better off repeating the |
…2293) Also: - include link to `bigframes.bigquery.ai` in README - add partial ordering mode recommendation to starter sample - remove 2.0 warning Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Towards b/454350869 🦕
PR created by the Librarian CLI to initialize a release. Merging this PR will auto trigger a release. Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:c8612d3fffb3f6a32353b2d1abd16b61e87811866f7ec9d65b59b02eb452a620 <details><summary>bigframes: 2.30.0</summary> ## [2.30.0](googleapis/python-bigquery-dataframes@v2.29.0...v2.30.0) (2025-12-03) ### Features * Support mixed scalar-analytic expressions (#2239) ([20ab469d](googleapis/python-bigquery-dataframes@20ab469d)) * Allow drop_duplicates over unordered dataframe (#2303) ([52665fa5](googleapis/python-bigquery-dataframes@52665fa5)) * Preserve source names better for more readable sql (#2243) ([64995d65](googleapis/python-bigquery-dataframes@64995d65)) * use end user credentials for `bigframes.bigquery.ai` functions when `connection_id` is not present (#2272) ([7c062a68](googleapis/python-bigquery-dataframes@7c062a68)) * pivot_table supports fill_value arg (#2257) ([8f490e68](googleapis/python-bigquery-dataframes@8f490e68)) * Support builtins funcs for df.agg (#2256) ([956a5b00](googleapis/python-bigquery-dataframes@956a5b00)) * add bigquery.json_keys (#2286) ([b487cf1f](googleapis/python-bigquery-dataframes@b487cf1f)) * Add agg/aggregate methods to windows (#2288) ([c4cb39dc](googleapis/python-bigquery-dataframes@c4cb39dc)) * Add bigframes.pandas.crosstab (#2231) ([c62e5535](googleapis/python-bigquery-dataframes@c62e5535)) * Implement single-column sorting for interactive table widget (#2255) ([d1ecc61b](googleapis/python-bigquery-dataframes@d1ecc61b)) ### Bug Fixes * Pass credentials properly for read api instantiation (#2280) ([3e3fe259](googleapis/python-bigquery-dataframes@3e3fe259)) * Update max_instances default to reflect actual value (#2302) ([4489687e](googleapis/python-bigquery-dataframes@4489687e)) * Improve Anywidget pagination and display for unknown row counts (#2258) ([508deae5](googleapis/python-bigquery-dataframes@508deae5)) * Fix issue with stream upload batch size upload limit (#2290) ([6cdf64b0](googleapis/python-bigquery-dataframes@6cdf64b0)) * calling info() on empty dataframes no longer leads to errors (#2267) ([95a83f77](googleapis/python-bigquery-dataframes@95a83f77)) * do not warn with DefaultIndexWarning in partial ordering mode (#2230) ([cc2dbae6](googleapis/python-bigquery-dataframes@cc2dbae6)) ### Documentation * update docs and tests for Gemini 2.5 models (#2279) ([08c0c0c8](googleapis/python-bigquery-dataframes@08c0c0c8)) * Add Google Analytics configuration to conf.py (#2301) ([0b266da1](googleapis/python-bigquery-dataframes@0b266da1)) * fix LogisticRegression docs rendering (#2295) ([32e53134](googleapis/python-bigquery-dataframes@32e53134)) * update API reference to new `dataframes.bigquery.dev` location (#2293) ([da064397](googleapis/python-bigquery-dataframes@da064397)) * use autosummary to split documentation pages (#2251) ([f7fd2d20](googleapis/python-bigquery-dataframes@f7fd2d20)) </details>
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.)
Fixes #2217.
Also
test_second_level()to pre-Adding a retry for storage list_blobs(). #2252 (by retrying the entire test case)test_list_files()to pre-Add eventual consistency check for storage list_blobs() #2181 (by retrying the entire test case)list_blobs():test_root_level_w_delimiter(),test_first_level()andtest_third_level()setUpClass()helper (which also useslist_blobs()) in bothTestStoragePseudoHierarchyandTestStorageListFiles@tseaver I would like some input here. I am worried that
RetryErrorson the errorunittest.TestCase.failureExceptionis insufficient / overly general. This is especially becauseunittest.TestCase.failureExceptionis just an alias forAssertionError.Should we temporarily replace it (via another decorator)?