Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

feat: add support for updateDatabase in Cloud Spanner - #914

Merged
rajatbhatta merged 14 commits into
googleapis:mainfrom
aayushimalik:drop-database-protection
May 16, 2023
Merged

feat: add support for updateDatabase in Cloud Spanner#914
rajatbhatta merged 14 commits into
googleapis:mainfrom
aayushimalik:drop-database-protection

Conversation

@aayushimalik

Copy link
Copy Markdown
Contributor

No description provided.

@aayushimalik
aayushimalik requested review from a teamMarch 16, 2023 11:22
@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/python-spanner API. labels Mar 16, 2023
from google.iam.v1 import options_pb2
from google.protobuf.field_mask_pb2 import FieldMask

from google.cloud.spanner_admin_database_v1 import CreateDatabaseRequest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks

import mock
from google.api_core import gapic_v1
from google.cloud.spanner_admin_database_v1 import Database as DatabasePB
from google.cloud.spanner_v1.param_types import INT64

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks

@aayushimalik
aayushimalik requested a review from a team as a code ownerMarch 21, 2023 09:49
@product-auto-labelproduct-auto-labelBot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Mar 21, 2023
@snippet-bot

snippet-botBot commented Mar 21, 2023

Copy link
Copy Markdown

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

@aayushimalik
aayushimalikforce-pushed the drop-database-protection branch from 9ca2103 to e4163d0CompareMarch 21, 2023 10:26
@product-auto-labelproduct-auto-labelBot added size: m Pull request size is medium. and removed size: l Pull request size is large. labels Mar 21, 2023
Comment threadgoogle/cloud/spanner_v1/database.py Outdated
@rajatbhattarajatbhatta changed the title feat: drop database protectionfeat: add support for updateDatabase in Cloud SpannerApr 4, 2023
Comment threadgoogle/cloud/spanner_v1/database.py Outdated
Comment threadgoogle/cloud/spanner_v1/database.py Outdated
self._database_dialect = database_dialect
self._database_role = database_role
self._enable_drop_protection = enable_drop_protection
self._reconciling = False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't see any place where this value is updated?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This is updated at line 359 of this file, using the property setter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am referring to reconciling

Comment threadgoogle/cloud/spanner_v1/database.py
Comment threadtests/system/test_database_api.py Outdated
@asthamohtaasthamohta added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 26, 2023
@rajatbhattarajatbhatta added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels May 12, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 15, 2023
@rajatbhatta
rajatbhatta enabled auto-merge (squash) May 16, 2023 06:24
@rajatbhattarajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@rajatbhattarajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@rajatbhatta

Copy link
Copy Markdown
Contributor

Added samples from #917 to here (for single merge). Both PRs are approved.

@rajatbhattarajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@rajatbhattarajatbhatta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 16, 2023
@rajatbhatta
rajatbhatta merged commit 6c7ad29 into googleapis:mainMay 16, 2023
@release-pleaserelease-pleaseBot mentioned this pull request May 16, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spannerIssues related to the googleapis/python-spanner API.size: mPull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@aayushimalik@rajatbhatta@asthamohta@grace223@yoshi-kokoro