Skip to content

chore: complete google-cloud-bigtable migration#16708

Draft
jskeet wants to merge 3 commits intogoogleapis:mainfrom
jskeet:generate-bigtable
Draft

chore: complete google-cloud-bigtable migration#16708
jskeet wants to merge 3 commits intogoogleapis:mainfrom
jskeet:generate-bigtable

Conversation

@jskeet
Copy link
Copy Markdown
Contributor

@jskeet jskeet commented Apr 17, 2026

It looks like this hadn't been regenerated with the latest version of the GAPIC generator (or at least not reformatted afterwards).

Fixes googleapis/librarian#5331

jskeet added 3 commits April 17, 2026 06:12
- Remove `skip_generate: true` from librarian.yaml
- Use `\Z` instead of `\z` in string replacements

(`\z` is only available in Python 3.14+ whereas the Librarian docker
image uses Python 3.11. `\Z` means the same thing and is the simplest
fix for now.)
This was performed with `nox -f format --no-install --no-venv`
@jskeet jskeet requested a review from parthea April 17, 2026 06:17
@jskeet jskeet requested review from a team as code owners April 17, 2026 06:17
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request performs a significant cleanup and reformatting of imports across the Google Cloud Bigtable library, including several auto-generated files. Key functional changes include updating the AutomatedBackupPolicy in the admin API to support a new locations field and an expanded retention period range (3 to 90 days). Additionally, license headers were added to several test proxy proto files, and the repository metadata was streamlined. Feedback is provided regarding a minor typo in the documentation for the newly added locations field.

Comment on lines +370 to +371
``projects/{project}/locations/{zone}``. This field can only
set for tables in Enterprise Plus instances.
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.

medium

There is a typo in the docstring for the locations field. It should be "can only be set" instead of "can only set".

Suggested change
``projects/{project}/locations/{zone}``. This field can only
set for tables in Enterprise Plus instances.
projects/{project}/locations/{zone}. This field can only
be set for tables in Enterprise Plus instances.

@parthea
Copy link
Copy Markdown
Contributor

parthea commented Apr 17, 2026

One of the unit tests failed with AssertionError: Found differences. Run nox -s generate_sync to update:. See the nox session here:

def generate_sync(session):
"""
Re-generate sync files for the library from CrossSync-annotated async source
"""
session.install(BLACK_VERSION)
session.install("autoflake")
session.run("python", ".cross_sync/generate.py", ".")

We may need to update the following code to switch from black to ruff

import black # type: ignore
import autoflake # type: ignore
full_str = black.format_str(
autoflake.fix_code(full_str, remove_all_unused_imports=True),
mode=black.FileMode(),
)

We may be able to remove the code formatting in the nox session if it's being done by the librarian. I don't have a lot of context on this code. cc @daniel-sanche

@parthea
Copy link
Copy Markdown
Contributor

parthea commented Apr 17, 2026

Switching to draft until checks are green

@parthea parthea marked this pull request as draft April 17, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

python: fix and enable generation for google-cloud-bigtable

2 participants