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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Copy Backup #680

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

feat: Copy Backup #680

wants to merge 14 commits into from

Conversation

Mariatta
Copy link
Contributor

No description provided.

@Mariatta Mariatta requested review from a team as code owners September 27, 2022 21:24
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigtable Issues related to the googleapis/python-bigtable API. labels Sep 27, 2022
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Sep 28, 2022
google/cloud/bigtable/backup.py Outdated Show resolved Hide resolved

return api.copy_backup(
request={
"parent": parent,
Copy link
Collaborator

Choose a reason for hiding this comment

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

how does this work if the source backup project and parent backup project are different?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

parent is constructed using project_id, instance_id, cluster_id. It's allowed to be different I believe as long as the user have access to both. I'm not seeing any restriction about it from the design doc. From the client we will pass the path, and relay back error from the server.

@@ -323,6 +324,27 @@ def test_table_backup(
temp_table_backup.expire_time
)

# Testing `backup.copy()` method
backup_op = temp_backup.copy("copied-backup")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also add some test cases with some of the other parameters set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added tests that pass additional parameters.

tests/system/test_table_admin.py Outdated Show resolved Hide resolved
tests/system/test_table_admin.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/python-bigtable API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants