GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add dual region bucket support and sample by cojenco · Pull Request #748 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@cojenco

@cojenco cojenco commented Mar 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cojenco
feat: add dual region bucket support and tests
40e22f8
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 31, 2022
@cojenco
add dual region bucket sample
9bce894
@snippet-bot

snippet-bot Bot commented Mar 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 1 region tag.
  • samples/snippets/storage_create_bucket_dual_region.py:23, tag storage_create_bucket_dual_region

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cojenco cojenco changed the title feat: add dual region bucket support and tests feat: add dual region bucket support and sample Mar 31, 2022
@cojenco
fix lint
53ff4e6
danielbankhead
danielbankhead approved these changes Apr 1, 2022
View reviewed changes

@danielbankhead danielbankhead left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@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

cojenco commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cojenco

cojenco commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielbankhead

danielbankhead commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

Yep, correct

cojenco reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielbankhead danielbankhead mentioned this pull request Apr 5, 2022
test: Updates for Dual Region and testing googleapis/java-storage#1340
Merged
@danielbankhead
Merge branch 'main' into dual739
c95fe2d
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Apr 5, 2022
@cojenco
update docstrings and doc ref links
37bbeba
@cojenco
cojenco marked this pull request as ready for review April 5, 2022 20:12
@cojenco
cojenco requested a review from a team as a code owner April 5, 2022 20:12
@cojenco
cojenco requested review from a team and parthea April 5, 2022 20:12
@cojenco

cojenco commented Apr 5, 2022

Copy link
Copy Markdown
Contributor Author

Yep, correct

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
Merge branch 'main' into dual739
6643a64
@cojenco

cojenco commented Apr 6, 2022

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cojenco
cojenco merged commit 752e8ab into googleapis:main Apr 6, 2022
@release-please release-please Bot mentioned this pull request Apr 6, 2022
chore(main): release 2.3.0 #746
Merged
andrewsg
andrewsg reviewed Apr 6, 2022
View reviewed changes
Comment thread google/cloud/storage/client.py
(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,

@andrewsg andrewsg Apr 6, 2022

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@release-please release-please Bot mentioned this pull request Aug 10, 2022
chore(main): release 2.6.0 #838
Merged
@cojenco
cojenco deleted the dual739 branch November 16, 2023 22:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@parthea parthea Awaiting requested review from parthea parthea is a code owner automatically assigned from googleapis/python-samples-reviewers
2 more reviewers
@andrewsg andrewsg andrewsg left review comments
@danielbankhead danielbankhead danielbankhead approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

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

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add Support for Dual Region Buckets

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@cojenco @danielbankhead @andrewsg @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.