Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

docs: Added UPGRADING.md with admin client migration#1201

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
gkevinzheng wants to merge2 commits intov3_staging
base:v3_staging
Choose a base branch
Loading
frommove-admin

Conversation

@gkevinzheng
Copy link
Contributor

The changes toUPGRADING.md here builds upon some of the changes toUPGRADING.md in#1169 with additions for admin client migration.

@gkevinzhenggkevinzheng requested review froma team ascode ownersAugust 26, 2025 20:43
@product-auto-labelproduct-auto-labelbot added the size: sPull request size is small. labelAug 26, 2025
@product-auto-labelproduct-auto-labelbot added the api: bigtableIssues related to the googleapis/python-bigtable API. labelAug 26, 2025
UPGRADING.md Outdated

### Admin Client Migration

While we do recommend you instantiate the new admin API clients directly, you can access the new admin API
Copy link
Contributor

Choose a reason for hiding this comment

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

We should show how to do it the recommended way first. Maybe something like:

The TableAdminClient can now be imported directly from google.cloud.bigtable.admin. This is the new recommended approach:
from google.cloud.bigtable.admin import TableAdminClient
...
Access to the admin clients throughgoogle.cloud.bigtable.Client is also supported for backward compatibility:
...

gkevinzheng reacted with thumbs up emoji
@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. and removed size: sPull request size is small. labelsAug 27, 2025
Comment on lines +15 to +45
### Admin Client Migration

We recommend that you instantiate the new admin API clients directly:

```
from google.cloud.bigtable.admin import (
BigtableInstanceAdminClient,
BigtableInstanceAdminAsyncClient,
BigtableTableAdminClient,
BigtableTableAdminAsyncClient,
)

instance_admin_client = BigtableInstanceAdminClient()
instance_admin_async_client = BigtableInstanceAdminAsyncClient()
table_admin_client = BigtableTableAdminClient()
table_admin_async_client = BigtableTableAdminAsyncClient()
```

Access to the new admin API sync clients via the `google.cloud.bigtable.Client` class is also supported for backwards compatibility:

```
from google.cloud.bigtable import Client

client = Client()

# google.cloud.bigtable.admin.BigtableInstanceAdminClient
instance_admin_client = client.instance_admin_client()

# google.cloud.bigtable.admin.BigtableTableAdminClient
table_admin_client = client.table_admin_client()
```

Choose a reason for hiding this comment

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

What if user add new client with the future-proof import, in addition to existing client like the following?

i.e.

# User's existing codefrom google.cloud.bigtable import Clientclient = Client()instance_admin_client = client.instance_admin_client()# Added new code to try out the "correct way" of importing new client"from google.cloud.bigtable.admin import BigtableInstanceAdminClientinstance_admin_client_new = BigtableInstanceAdminClient()

I guess this technically would create two clients which we don't want?


The deprecated client will remain available as an alternative API surface, which internally delegates calls to the respective new clients. For most users, existing code will continue to work as before. But there may be some breaking changes associated with this update, which are detailed in this document.

### Admin Client Migration
Copy link

@iam-ethan-huangiam-ethan-huangSep 3, 2025
edited
Loading

Choose a reason for hiding this comment

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

Currently it is more like a quick-start guide, instead of the migration guide.

For migration, we should start from the code users have from legacy client and suggest what to do from there.

For example:
Path A (if you have time) - Add new import, remove old import, and convert all methods to new style, rebuild, test.
Path B (if you don't have time, but want to get new features) - Get new client via legacy client and use it.

And indicate the path B is only for backward compatible phase and will be eventually deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'd probably suggest removing this section for now, and we can just add to the breaking change section as we add PRs. We can re-visit other content to include at the end (and we have that other doc to discuss this on as well)

## Breaking Changes
- **[MutationBatcher](https://github.com/googleapis/python-bigtable/blob/main/google/cloud/bigtable/data/_sync_autogen/mutations_batcher.py#L151)and [MutationBatcherAsync](https://github.com/googleapis/python-bigtable/blob/main/google/cloud/bigtable/data/_async/mutations_batcher.py#L182)'s `table` argument was renamed to `target`**, since it also supports [Authorized View](https://github.com/googleapis/python-bigtable/pull/1034) instances. This matches the naming used in other classes (PR: https://github.com/googleapis/python-bigtable/pull/1153)
<!-- TODO: Replace Github link once the feature branch is merged -->
- **[`BigtableTableAdminClient`/`BigtableTableAdminAsyncClient`](https://github.com/googleapis/python-bigtable/blob/main/google/cloud/bigtable_admin_v2/overlay/services/bigtable_table_admin)'s location was changed from `google.cloud.bigtable_admin_v2.services.bigtable_table_admin` to `google.cloud.bigtable_admin_v2.overlay.services.bigtable_table_admin`**. This should not affect you if you are importing these clients via `import google.cloud.bigtable_admin_v2` due to import aliasing, but will affect you if you are importing these clients via `import google.cloud.bigtable_admin_v2.services.bigtable_table_admin`.
Copy link
Contributor

Choose a reason for hiding this comment

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

This bullet is a bit confusing. Is this referring to callingclient.instance_admin_client()?

It doesn't really say how this will impact people, or what they'd need to do

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@daniel-sanchedaniel-sanchedaniel-sanche left review comments

@iam-ethan-huangiam-ethan-huangiam-ethan-huang requested changes

Assignees

No one assigned

Labels

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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@gkevinzheng@daniel-sanche@iam-ethan-huang@jackdingilian

[8]ページ先頭

©2009-2025 Movatter.jp