Skip to content

chore: add Rapid x region sys test#1765

Merged
chandra-siri merged 3 commits intomainfrom
rapid_x_region_sys_test
Mar 3, 2026
Merged

chore: add Rapid x region sys test#1765
chandra-siri merged 3 commits intomainfrom
rapid_x_region_sys_test

Conversation

@chandra-siri
Copy link
Collaborator

@chandra-siri chandra-siri commented Mar 3, 2026

feat: Add system test for cross-region buckets

  • Adds a new system test, test_basic_wrd_x_region, to verify functionality with cross-region GCS buckets.

  • Also updates the Cloud Build configuration to pass the necessary _CROSS_REGION_BUCKET environment variable to the test environment

This PR is a cherry-picked from #1760 because that PR is blocked by b/489420625

Adds a new system test, test_basic_wrd_x_region, to verify functionality with cross-region GCS buckets.

Also updates the Cloud Build configuration to pass the necessary _CROSS_REGION_BUCKET environment variable to the test environment.
Renames open_retries to _open_retries in AsyncMultiRangeDownloader to encapsulate the retry counter. Updates test_zonal.py to verify the private attribute.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/python-storage API. labels Mar 3, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new system test to validate the behavior of asynchronous multi-range downloads and appends with Google Cloud Storage buckets configured for cross-region access. It ensures that the system can correctly handle data operations across different geographical regions, and updates the build process to support this new testing scenario.

Highlights

  • New System Test: A new system test, test_basic_wrd_x_region, has been added to verify functionality with cross-region GCS buckets, covering various object sizes.
  • Cloud Build Configuration Update: The Cloud Build configuration (cloudbuild/zb-system-tests-cloudbuild.yaml) was updated to pass the _CROSS_REGION_BUCKET environment variable to the test environment, enabling cross-region tests.
  • Retry Counter for AsyncMultiRangeDownloader: An _open_retries counter was introduced in AsyncMultiRangeDownloader to track the number of retry attempts when opening the underlying bidi-gRPC connection, and this counter is asserted in the new system test.
Changelog
  • cloudbuild/zb-system-tests-cloudbuild.yaml
    • Passed CROSS_REGION_BUCKET environment variable to the test environment via gcloud compute ssh command.
  • google/cloud/storage/asyncio/async_multi_range_downloader.py
    • Added _open_retries attribute to AsyncMultiRangeDownloader to count retry attempts.
    • Modified on_error callbacks within the open method to increment the _open_retries counter.
  • tests/system/test_zonal.py
    • Declared _CROSS_REGION_BUCKET environment variable by retrieving it from os.getenv.
    • Added a new parameterized system test test_basic_wrd_x_region to test write, read, and delete operations with cross-region buckets.
    • Included assertions for _open_retries within the new cross-region test to verify retry behavior.
Activity
  • No specific human activity (comments, reviews, etc.) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@chandra-siri chandra-siri changed the title Rapid x region sys test chore: add Rapid x region sys test Mar 3, 2026
@chandra-siri chandra-siri marked this pull request as ready for review March 3, 2026 16:20
@chandra-siri chandra-siri requested review from a team as code owners March 3, 2026 16:20
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a system test for cross-region buckets, which is a valuable addition. My review focuses on improving the consistency of environment variable naming for better maintainability. I've suggested changes in both the Cloud Build configuration and the test file to align the new variable with existing conventions.

@chandra-siri chandra-siri merged commit 810441c into main Mar 3, 2026
15 checks passed
@chandra-siri chandra-siri deleted the rapid_x_region_sys_test branch March 3, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the googleapis/python-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants