Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 3.0.0 Migration Guide

The v3.0.0 release of `google-cloud-bigtable` deprecates the previous `google.cloud.bigtable.Client` class in favor of distinct clients for the two API surfaces, supporting both sync and async calls:
- Data API:
- `google.cloud.bigtable.data.BigtableDataClient`
- `google.cloud.bigtable.data.BigtableDataClientAsync`
- Admin API:
- `google.cloud.bigtable.admin.BigtableInstanceAdminClient`
- `google.cloud.bigtable.admin.BigtableInstanceAdminClientAsync`
- `google.cloud.bigtable.admin.BigtableTableAdminClient`
- `google.cloud.bigtable.admin.BigtableTableAdminClientAsync`

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-huang iam-ethan-huang Sep 3, 2025

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)


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 through google.cloud.bigtable.Client is also supported for backward compatibility:
...

clients via the `google.cloud.bigtable.Client` class:

```
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()
```

## 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 calling client.instance_admin_client()?

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

Loading