Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add dual region bucket support and sample #748

Merged
merged 6 commits into from Apr 6, 2022

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented Mar 31, 2022

Add dual region bucket support and sample

  • method client.create_bucket() accepts a dual-region location as a string with 2 regions concatenated with a '+' (e.g. "US-EAST1+US-WEST1")
  • system test verifies a dual region bucket with specified regions can be created with correct location and location_type
  • create dual region bucket sample

Fixes #739 馃

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 31, 2022
@snippet-bot
Copy link

snippet-bot bot commented Mar 31, 2022

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@cojenco cojenco changed the title feat: add dual region bucket support and tests feat: add dual region bucket support and sample Mar 31, 2022
Copy link
Member

@danielbankhead danielbankhead left a comment

Choose a reason for hiding this comment

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

LGTM, one nit - we'll want to update references from 'dual region' to 'dual-region'

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Apr 1, 2022
@cojenco cojenco added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 1, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 1, 2022
@cojenco
Copy link
Contributor Author

cojenco commented Apr 1, 2022

Update - Python samples projects have been added to the allowlist (internal cl/438869140). Awaiting for deployment in the next 2 weeks.

@cojenco
Copy link
Contributor Author

cojenco commented Apr 1, 2022

LGTM, one nit - we'll want to update references from 'dual region' to 'dual-region'

@danielbankhead thanks for the review! Do you mean updating the docstrings in client.py?

@danielbankhead
Copy link
Member

Yep, correct

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Apr 5, 2022
@cojenco cojenco marked this pull request as ready for review April 5, 2022 20:12
@cojenco cojenco requested review from a team as code owners April 5, 2022 20:12
@cojenco cojenco requested a review from parthea April 5, 2022 20:12
@cojenco
Copy link
Contributor Author

cojenco commented Apr 5, 2022

Yep, correct

Updated the docstrings and the docs link as discussed in java thread.

@cojenco cojenco added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Apr 6, 2022
@cojenco
Copy link
Contributor Author

cojenco commented Apr 6, 2022

Note(04.06.2022): Dual-region storage is currently a Pre-GA feature https://cloud.google.com/storage/docs/dual-regions

@cojenco cojenco merged commit 752e8ab into googleapis:main Apr 6, 2022
@@ -875,8 +875,9 @@ def create_bucket(
made via created bucket.
location (str):
(Optional) The location of the bucket. If not passed,
the default location, US, will be used. See
https://cloud.google.com/storage/docs/bucket-locations
the default location, US, will be used. If specifying a dual-region,
Copy link
Contributor

Choose a reason for hiding this comment

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

May I suggest the following:

(Optional) The location of the bucket. If not passed, the default location, 'US', will be used. If specifying a dual-region location, the regions can be specified by joining them with a plus sign, for example 'US-CENTRAL1+US-WEST1'. See:
https://cloud.google.com/storage/docs/locations

@cojenco cojenco deleted the dual739 branch November 16, 2023 22:07
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. samples Issues that are directly related to samples. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Support for Dual Region Buckets
4 participants