chore(migration): Migrate code from googleapis/python-bigtable into packages/google-cloud-bigtable#16003
chore(migration): Migrate code from googleapis/python-bigtable into packages/google-cloud-bigtable#16003
Conversation
* fix(deps): Require google-api-core >=1.34.0, >=2.11.0 fix: Drop usage of pkg_resources fix: Fix timeout default values docs(samples): Snippetgen should call await on the operation coroutine before calling result PiperOrigin-RevId: 493260409 Source-Link: googleapis/googleapis@fea4387 Source-Link: googleapis/googleapis-gen@387b734 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzg3YjczNDRjNzUyOWVlNDRiZTg0ZTYxM2IxOWE4MjA1MDhjNjEyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update release-please-config.json * drop pkg_resources * update the version in gapic_version.py * fix typo * lint Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…cp/templates/python_library/.kokoro (#711) Source-Link: googleapis/synthtool@b4fe62e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3bf87e47c2173d7eed42714589dc4da2c07c3268610f1e47f8e1a30decbfc7f1 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore(python): add support for python 3.11 Source-Link: googleapis/synthtool@7197a00 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320 * add constraints file for python 3.11 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* feat: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: googleapis/googleapis@190b612 Source-Link: googleapis/googleapis-gen@7bf29a4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * require proto-plus 1.22.2 for python 3.11 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: googleapis/googleapis@a391fd1 Source-Link: googleapis/googleapis-gen@0080f83 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: Update gapic-generator-python to v1.8.2 PiperOrigin-RevId: 504289125 Source-Link: googleapis/googleapis@38a48a4 Source-Link: googleapis/googleapis-gen@b2dc226 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * omit gapic_version.py from coverage Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/26c7505b2f76981ec1707b851e1595c8c06e90fc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f946c75373c2b0040e8e318c5e85d0cf46bc6e61d0a01f3ef94d8de974ac6790
…p/templates/python_library/.kokoro (#733) Source-Link: https://togithub.com/googleapis/synthtool/commit/bb171351c3946d3c3c32e60f5f18cee8c464ec51 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f62c53736eccb0c4934a3ea9316e0d57696bb49c1a7c86c726e9bb8a2f87dadf
…ets (#734) * feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: googleapis/googleapis-gen@6ad1279 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: publish the Cloud Bigtable Change Streams PiperOrigin-RevId: 508465928 Source-Link: googleapis/googleapis@3770af2 Source-Link: googleapis/googleapis-gen@0280f1f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDI4MGYxZjViOTkwZDkwMTNhMWM0YzU1NWRlZjI0MWEzMTI0MjM3NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix(deps): require google-api-core>=1.34.0,>=2.11.0 * fix: Add service_yaml_parameters to py_gapic_library BUILD.bazel targets PiperOrigin-RevId: 510187992 Source-Link: googleapis/googleapis@5edc235 Source-Link: googleapis/googleapis-gen@b0bedb7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjBiZWRiNzJlNDc2NWEzZTBiNjc0YTI4YzUwZWEwZjlhOWIyNmE4OSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * run generator at main; fix mypy errors * remove obsolete replacements in owlbot.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: googleapis/googleapis-gen@1907294 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@5f2a608 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8555f0e37e6261408f792bfd6635102d2da5ad73f8f09bcb24f25e6afb5fac97 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…ngeStream (#740) * feat: add new_partitions field for CloseStream for Cloud Bigtable ChangeStream PiperOrigin-RevId: 512957844 Source-Link: googleapis/googleapis@c5650ae Source-Link: googleapis/googleapis-gen@a71ec9c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTcxZWM5Y2MwYTg3MTI4NjU4N2YxZGYxYzVlNDM0YzViYzMzOGY5MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Replaces googleapis/python-bigtable#1231 Fixes b/452032333 Adds a sample for the new AddToCell incrementation mutation --------- Co-authored-by: Kasia Strzałkowska <strzalkowska@google.com>
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [apache-beam](https://beam.apache.org) | `==2.69.0` → `==2.71.0` |  |  | | [google-cloud-bigtable](https://redirect.github.com/googleapis/python-bigtable) | `==2.34.0` → `==2.35.0` |  |  | | [google-cloud-monitoring](https://redirect.github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-monitoring) ([source](https://redirect.github.com/googleapis/google-cloud-python)) | `==2.28.0` → `==2.29.0` |  |  | --- ### Release Notes <details> <summary>googleapis/python-bigtable (google-cloud-bigtable)</summary> ### [`v2.35.0`](https://redirect.github.com/googleapis/python-bigtable/blob/HEAD/CHANGELOG.md#2350-2025-12-16) [Compare Source](https://redirect.github.com/googleapis/python-bigtable/compare/v2.34.0...v2.35.0) ##### Features - support mTLS certificates when available ([#​1249](https://redirect.github.com/googleapis/python-bigtable/issues/1249)) ([ca20219cf45305de25dfb715f69dd63bce9981b7](https://redirect.github.com/googleapis/python-bigtable/commit/ca20219cf45305de25dfb715f69dd63bce9981b7)) - add basic interceptor to client ([#​1206](https://redirect.github.com/googleapis/python-bigtable/issues/1206)) ([6561cfac605ba7c5b3f750c3bdca9108e517ba77](https://redirect.github.com/googleapis/python-bigtable/commit/6561cfac605ba7c5b3f750c3bdca9108e517ba77)) - add PeerInfo proto in Bigtable API ([72dfdc440c22db0f4c372e6f11a9f7dc83fed350](https://redirect.github.com/googleapis/python-bigtable/commit/72dfdc440c22db0f4c372e6f11a9f7dc83fed350)) - Add Type API updates needed to support structured keys in materialized views ([72dfdc440c22db0f4c372e6f11a9f7dc83fed350](https://redirect.github.com/googleapis/python-bigtable/commit/72dfdc440c22db0f4c372e6f11a9f7dc83fed350)) - Add encodings for STRUCT and the Timestamp type ([72dfdc440c22db0f4c372e6f11a9f7dc83fed350](https://redirect.github.com/googleapis/python-bigtable/commit/72dfdc440c22db0f4c372e6f11a9f7dc83fed350)) ##### Bug Fixes - async client uses fixed grace period ([#​1236](https://redirect.github.com/googleapis/python-bigtable/issues/1236)) ([544db1cd7af876298b8637f495b6c7b2a0bcf16c](https://redirect.github.com/googleapis/python-bigtable/commit/544db1cd7af876298b8637f495b6c7b2a0bcf16c)) - re-export AddToCell for consistency ([#​1241](https://redirect.github.com/googleapis/python-bigtable/issues/1241)) ([2a5baf11d30dc383a7b48d5f43b6cbb6160782e3](https://redirect.github.com/googleapis/python-bigtable/commit/2a5baf11d30dc383a7b48d5f43b6cbb6160782e3)) - retry cancelled errors ([#​1235](https://redirect.github.com/googleapis/python-bigtable/issues/1235)) ([e3fd5d8668303db4ed35e9bf6be48b46954f9d67](https://redirect.github.com/googleapis/python-bigtable/commit/e3fd5d8668303db4ed35e9bf6be48b46954f9d67)) - Add ReadRows/SampleRowKeys bindings for materialized views ([72dfdc440c22db0f4c372e6f11a9f7dc83fed350](https://redirect.github.com/googleapis/python-bigtable/commit/72dfdc440c22db0f4c372e6f11a9f7dc83fed350)) - Deprecate credentials\_file argument ([72dfdc440c22db0f4c372e6f11a9f7dc83fed350](https://redirect.github.com/googleapis/python-bigtable/commit/72dfdc440c22db0f4c372e6f11a9f7dc83fed350)) </details> <details> <summary>googleapis/google-cloud-python (google-cloud-monitoring)</summary> ### [`v2.29.0`](https://redirect.github.com/googleapis/google-cloud-python/compare/google-cloud-speech-v2.28.1...google-cloud-speech-v2.29.0) [Compare Source](https://redirect.github.com/googleapis/google-cloud-python/compare/google-cloud-monitoring-v2.28.0...google-cloud-monitoring-v2.29.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/python-bigtable). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41NC4yIiwidXBkYXRlZEluVmVyIjoiNDIuODUuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> --------- Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Some samples currently use `datetime.datetime.utcnow()`, which raises a deprecation warning. Update samples to use datetime.datetime.now instead Fixes b/457135528
PR created by the Librarian CLI to generate Cloud Client Libraries code from protos. BEGIN_COMMIT BEGIN_NESTED_COMMIT feat: add TieredStorageConfig to table admin api PiperOrigin-RevId: 863493708 Library-IDs: google-cloud-bigtable Source-link: [googleapis/googleapis@a6cbf809](googleapis/googleapis@a6cbf809) END_NESTED_COMMIT END_COMMIT This pull request is generated with proto changes between [googleapis/googleapis@a17b84ad](googleapis/googleapis@a17b84a) (exclusive) and [googleapis/googleapis@a6cbf809](googleapis/googleapis@a6cbf80) (inclusive). Librarian Version: v0.7.0 Language Image: us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:b8058df4c45e9a6e07f6b4d65b458d0d059241dd34c814f151c8bf6b89211209
… into migration.python-bigtable.migration.2026-03-02_16-59-45.migrate
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on migrating the Bigtable code from the googleapis/python-bigtable repository to the packages/google-cloud-bigtable directory. It also introduces CrossSync, a mechanism for sharing logic between async and sync code, along with associated tooling and configurations. The PR aims to maintain git history and improve code maintainability. Highlights
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request migrates a large number of files for the google-cloud-bigtable package. The changes primarily consist of adding new files, including source code, documentation, and configuration. My review focuses on ensuring the correctness, maintainability, and security of the newly added code. I've identified a few areas for improvement, such as unsafe command-line argument handling, potential security risks with eval, and opportunities to improve code clarity and robustness.
Note: Security Review is unavailable for this PR.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/google-cloud-bigtable/.cross_sync/generate.py (104)
Accessing sys.argv[1] directly is unsafe and will raise an IndexError if the script is run without command-line arguments. It's better to validate the number of arguments first and provide a helpful usage message if an argument is missing.
if len(sys.argv) < 2:
raise SystemExit(f"Usage: {sys.argv[0]} <path>")
search_root = sys.argv[1]
packages/google-cloud-bigtable/.cross_sync/README.md (40)
There appears to be a typo in the method name. It should likely be CrossSync.event_wait() instead of CrossSync,event_wait().
- `CrossSync.event_wait()`
packages/google-cloud-bigtable/.cross_sync/generate.py (26)
For better code clarity and maintainability, please add a type hint for the file_path parameter. Based on its usage, str would be appropriate.
def extract_header_comments(file_path: str) -> str:
packages/google-cloud-bigtable/.cross_sync/generate.py (32)
It is a best practice to explicitly specify the file encoding when using open(). This prevents potential issues on different platforms where the default encoding might vary. Please consider adding encoding="utf-8".
with open(file_path, "r", encoding="utf-8") as f:
packages/google-cloud-bigtable/.cross_sync/generate.py (85)
It is a best practice to explicitly specify the file encoding when using open(). This prevents potential issues on different platforms where the default encoding might vary. Please consider adding encoding="utf-8".
ast_tree = ast.parse(open(file_path, encoding="utf-8").read())
packages/google-cloud-bigtable/.cross_sync/transformers.py (34)
Modifying sys.path at runtime is generally discouraged as it can make the code harder to understand and maintain, and may lead to module import conflicts. Consider using relative imports or restructuring the project to avoid this.
packages/google-cloud-bigtable/.cross_sync/transformers.py (245)
Comparing a boolean value with == True is not idiomatic in Python. It's clearer and more conventional to use the value directly in a boolean context, or use is True for a strict identity check.
return self._is_async_check(node.left) and (isinstance(node.ops[0], ast.Eq) or isinstance(node.ops[0], ast.Is)) and len(node.comparators) == 1 and isinstance(node.comparators[0], ast.Constant) and node.comparators[0].value is True
packages/google-cloud-bigtable/.kokoro/conformance.sh (38)
The use of eval with a variable can be a security risk if the content of $TEST_ARGS is not strictly controlled, as it could allow for arbitrary command execution. While this might be safe in a controlled CI environment, it's a good practice to avoid eval whenever possible. Consider alternative ways to pass arguments that do not require evaluation.
packages/google-cloud-bigtable/.kokoro/populate-secrets.sh (28)
The for key in $(...) construct is not robust against values in ${SECRET_MANAGER_KEYS} that contain whitespace or other special shell characters. This could lead to unexpected behavior or errors. A more robust approach for iterating over comma-separated values should be used, for example, by using read with a while loop or by setting IFS.
See #10992.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.