Skip to content

chore(migration): Migrate code from googleapis/python-ndb into packages/google-cloud-ndb#16009

Draft
parthea wants to merge 658 commits intomainfrom
migration.python-ndb.migration.2026-03-02_16-59-45.migrate
Draft

chore(migration): Migrate code from googleapis/python-ndb into packages/google-cloud-ndb#16009
parthea wants to merge 658 commits intomainfrom
migration.python-ndb.migration.2026-03-02_16-59-45.migrate

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Mar 2, 2026

See #10916.

This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.

Chris Rossi and others added 30 commits September 2, 2020 08:47
…528)

The emulator is different enough from the real Datastore to require some
special handling.

Fixes #525
* chore: updated CHANGELOG.md [ci skip]

* chore: updated setup.py

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Adds a new `GlobalCache` implementation, `MemcacheCache`, which allows
memcached to be used as a global cache. May be used with a Google
Memorystore, or any configured memcached instance.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* build: keep synth in sync
* build(python): use release-publish app for notifying GitHub of release status

* fix: re-add pypi password

Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Sep 16 08:46:42 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 257fda18168bedb76985024bd198ed1725485488
Source-Link: googleapis/synthtool@257fda1

* build(python): add secret manager in kokoro

Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Sep 16 10:24:40 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: dba48bb9bc6959c232bec9150ac6313b608fe7bd
Source-Link: googleapis/synthtool@dba48bb
https://github.com/googleapis/python-talent/blob/ef045e8eb348db36d7a2a611e6f26b11530d273b/samples/snippets/noxfile_config.py#L27-L32

`BUILD_SPECIFIC_GCLOUD_PROJECT` is an alternate project used for sample tests that do poorly with concurrent runs on the same project.

Source-Author: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
Source-Date: Wed Sep 30 13:06:03 2020 -0600
Source-Repo: googleapis/synthtool
Source-Sha: 9b0da5204ab90bcc36f8cd4e5689eff1a54cc3e4
Source-Link: googleapis/synthtool@9b0da52
…ync (#554)

* fix: `@non_transactional` decorator was not working correctly with async

Fixes #552

* We don't really need `_get_transaction` at all.

In all cases, we know where to get the transaction from.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* build: support python 3.8 amd 3.9

Refs: #555

* make 3.8 default python
* feat: fault tolerance for global caches

Closes #557

* Fix spelling.
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…569)

there are breaking changes in the next major version of datastore and pinning below 2.0.0 will stop those changes from breaking ndb.

Fixes #568
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* fix: return a tuple when empty result returned on query

* test: [] to ()
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Source-Author: Daniel Sanche <d.sanche14@gmail.com>
Source-Date: Wed Oct 14 08:00:06 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: 477764cc4ee6db346d3febef2bb1ea0abf27de52
Source-Link: googleapis/synthtool@477764c

Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
sorced-jim and others added 26 commits March 8, 2024 13:28
* fix: Show a non-None error for core_exception.Unknown errors.

* Add test for Unknown api errors.
* tests: Add a session for system tests against the emulator.

* 🦉 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>
Align ndb emulator grpc channel overrides with production overrides.
* chore(python): update dependencies in /.kokoro

Source-Link: googleapis/synthtool@db94845
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a8a80fc6456e433df53fc2a0d72ca0345db0ddefb409f1b75b118dfd1babd952

* 🦉 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: Jim Morrison <phython@google.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* tests: Add nox target to test against the old emulator.

* 🦉 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@d50980e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@a37f74c
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:d3de8a02819f65001effcbd3ea76ce97e9bcff035c7a89457f40f892c87c5b32

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* fix: Allow Protobuf 5.x

* add prerelease nox session

* 🦉 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(python): use python 3.10 for docs build

Source-Link: googleapis/synthtool@9ae0785
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:52210e0e0559f5ea8c52be148b33504022e1faef4e95fbe4b32d68022af2fa7e

* use python 3.10 for docs build

* upgrade sphinx to 4.5.0

* fix docs issues related to sphinx 4.5.0 update

---------

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>
clean up outdated cloud-storage-dpe group
* chore(main): release 2.3.3

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* fix: Allow Protobuf 6.x

* resolve 'Unable to locate package libenchant1c2a'

* update post processor

* remove spellcheck

* fix(deps): allow redis 6.x

* update constraints-3.13.txt

* fix typo
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Towards b/375664027

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.7.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:97c3041de740f26b132d3c5d43f0097f990e8b0d1f2e6707054840024c20ab0c
<details><summary>google-cloud-ndb: 2.4.0</summary>

##
[2.4.0](googleapis/python-ndb@v2.3.4...v2.4.0)
(2025-12-15)

### Features

* Add support for Python 3.14 (#1028)
([947ff9b7](googleapis/python-ndb@947ff9b7))

</details>
Automated: Migrate {target_path} from gsutil to gcloud storage

This CL is part of the on going effort to migrate from the legacy
`gsutil` tool to the new and improved `gcloud storage` command-line
interface.
`gcloud storage` is the recommended and modern tool for interacting with
Google Cloud Storage, offering better performance, unified
authentication, and a more consistent command structure with other
`gcloud` components. 🚀

### Automation Details

This change was **generated automatically** by an agent that targets
users of `gsutil`.
The transformations applied are based on the [gsutil to gcloud storage
migration guide](http://go/gsutil-gcloud-storage-migration-guide).

### ⚠️ Action Required: Please Review and Test Carefully

While we have based the automation on the migration guide, every use
case is unique.
**It is crucial that you thoroughly test these changes in environments
appropriate to your use-case before merging.**
Be aware of potential differences between `gsutil` and `gcloud storage`
that could impact your workflows.
For instance, the structure of command output may have changed,
requiring updates to any scripts that parse it. Similarly, command
behavior can differ subtly; the `gcloud storage rsync` command has a
different file deletion logic than `gsutil rsync`, which could lead to
unintended file deletions.

Our migration guides can help guide you through a list of mappings and
some notable differences between the two tools.

Standard presubmit tests are run as part of this CL's workflow. **If you
need to target an additional test workflow or require assistance with
testing, please let us know.**

Please verify that all your Cloud Storage operations continue to work as
expected to avoid any potential disruptions in production.

### Support and Collaboration

The `GCS CLI` team is here to help! If you encounter any issues, have a
complex use case that this automated change doesn't cover, or face any
other blockers, please don't hesitate to reach out.
We are happy to work with you to test and adjust these changes as
needed.

**Contact:** `gcs-cli-hyd@google.com`

We appreciate your partnership in this important migration effort!

#gsutil-migration
… migration.python-ndb.migration.2026-03-02_16-59-45.migrate
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 existing googleapis/python-ndb codebase into a new packages/google-cloud-ndb package. This involves adding all the source code, tests, and configurations required to build, test, and deploy the library from its new location. The primary goal is to move the NDB library into the google-cloud-python repository while maintaining its git history.

Highlights

  • Code Migration: Migrated the googleapis/python-ndb code into the packages/google-cloud-ndb package, effectively transferring the codebase.
  • New Files: Added numerous new files to the packages/google-cloud-ndb directory, including configuration files for coverage, flake8, GitHub workflows, Kokoro, and more.
  • Git History Preservation: Ensured that the PR is merged with a merge-commit to preserve the git history, as requested in the PR description.
Changelog
  • packages/google-cloud-ndb/.coveragerc
    • Added .coveragerc file to configure coverage settings, including branch coverage and exclusion rules.
  • packages/google-cloud-ndb/.flake8
    • Added .flake8 file to specify flake8 linting rules, ignoring certain error codes.
  • packages/google-cloud-ndb/.github/CODEOWNERS
    • Added CODEOWNERS file to define the default code owners for pull requests.
  • packages/google-cloud-ndb/.github/CONTRIBUTING.md
    • Added CONTRIBUTING.md file to provide guidelines for contributing to the project.
  • packages/google-cloud-ndb/.github/ISSUE_TEMPLATE/bug_report.md
    • Added bug_report.md file as an issue template for bug reports.
  • packages/google-cloud-ndb/.github/ISSUE_TEMPLATE/feature_request.md
    • Added feature_request.md file as an issue template for feature requests.
  • packages/google-cloud-ndb/.github/ISSUE_TEMPLATE/support_request.md
    • Added support_request.md file as an issue template for support requests.
  • packages/google-cloud-ndb/.github/workflows/unittest.yml
    • Added unittest.yml file to define a GitHub Actions workflow for running unit tests on multiple Python versions and reporting coverage.
  • packages/google-cloud-ndb/.gitignore
    • Added .gitignore file to specify intentionally untracked files that Git should ignore.
  • packages/google-cloud-ndb/.kokoro/build.sh
    • Added build.sh file to define the Kokoro build script, including environment setup, credential activation, and test execution.
  • packages/google-cloud-ndb/.kokoro/continuous/common.cfg
    • Added common.cfg file to define common Kokoro configuration for continuous builds, including artifact definitions and resource downloads.
  • packages/google-cloud-ndb/.kokoro/continuous/continuous.cfg
    • Added continuous.cfg file as a placeholder for continuous build configurations.
  • packages/google-cloud-ndb/.kokoro/continuous/prerelease-deps.cfg
    • Added prerelease-deps.cfg file to define environment variables for running prerelease dependency tests in Kokoro.
  • packages/google-cloud-ndb/.kokoro/noxfile.py
    • Added noxfile.py to define Nox sessions for linting, formatting, unit testing, and generating Readme files.
  • packages/google-cloud-ndb/.kokoro/populate-secrets.sh
    • Added populate-secrets.sh file to retrieve secrets from Secret Manager for Kokoro builds.
  • packages/google-cloud-ndb/.kokoro/presubmit/common.cfg
    • Added common.cfg file to define common Kokoro configuration for presubmit builds.
  • packages/google-cloud-ndb/.kokoro/presubmit/prerelease-deps.cfg
    • Added prerelease-deps.cfg file to define environment variables for running prerelease dependency tests in Kokoro for presubmit.
  • packages/google-cloud-ndb/.kokoro/presubmit/presubmit.cfg
    • Added presubmit.cfg file as a placeholder for presubmit build configurations.
  • packages/google-cloud-ndb/.kokoro/samples/lint/common.cfg
    • Added common.cfg file to define common Kokoro configuration for linting samples.
  • packages/google-cloud-ndb/.kokoro/samples/lint/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous linting of samples.
  • packages/google-cloud-ndb/.kokoro/samples/lint/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic linting of samples.
  • packages/google-cloud-ndb/.kokoro/samples/lint/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit linting of samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.10/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.10 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.10/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.10 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.10/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.10 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.10/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.10 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.10/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.10 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.11/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.11 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.11/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.11 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.11/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.11 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.11/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.11 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.11/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.11 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.12/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.12 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.12/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.12 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.12/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.12 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.12/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.12 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.12/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.12 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.13/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.13 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.13/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.13 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.13/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.13 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.13/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.13 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.13/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.13 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.14/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.14 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.14/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.14 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.14/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.14 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.14/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.14 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.14/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.14 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.6/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.6 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.6/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.6 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.6/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.6 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.6/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.6 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.6/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.6 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.7/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.7 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.7/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.7 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.7/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.7 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.7/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.7 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.7/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.7 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.8/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.8 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.8/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.8 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.8/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.8 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.8/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.8 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.8/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.8 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.9/common.cfg
    • Added common.cfg file to define common Kokoro configuration for Python 3.9 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.9/continuous.cfg
    • Added continuous.cfg file to define environment variables for continuous testing of Python 3.9 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.9/periodic-head.cfg
    • Added periodic-head.cfg file to define environment variables for periodic testing of Python 3.9 samples against head.
  • packages/google-cloud-ndb/.kokoro/samples/python3.9/periodic.cfg
    • Added periodic.cfg file to define environment variables for periodic testing of Python 3.9 samples.
  • packages/google-cloud-ndb/.kokoro/samples/python3.9/presubmit.cfg
    • Added presubmit.cfg file to define environment variables for presubmit testing of Python 3.9 samples.
  • packages/google-cloud-ndb/.kokoro/test-samples-against-head.sh
    • Added test-samples-against-head.sh file to define a customized test runner for samples against head.
  • packages/google-cloud-ndb/.kokoro/test-samples-impl.sh
    • Added test-samples-impl.sh file to define a customized test runner implementation for samples.
  • packages/google-cloud-ndb/.kokoro/test-samples.sh
    • Added test-samples.sh file to define a customized test runner for samples.
  • packages/google-cloud-ndb/.kokoro/trampoline.sh
    • Added trampoline.sh file to define a trampoline script for running in docker.
  • packages/google-cloud-ndb/.kokoro/trampoline_v2.sh
    • Added trampoline_v2.sh file to define a trampoline script for running in docker, version 2.
  • packages/google-cloud-ndb/.librarian/state.yaml
    • Added state.yaml file to define the Librarian state for the library.
  • packages/google-cloud-ndb/.repo-metadata.json
    • Added .repo-metadata.json file to provide metadata about the repository.
  • packages/google-cloud-ndb/.trampolinerc
    • Added .trampolinerc file to define environment variables for trampoline.
  • packages/google-cloud-ndb/AUTHORS
    • Added AUTHORS file to list the authors of the NDB library.
  • packages/google-cloud-ndb/CHANGELOG.md
    • Added CHANGELOG.md file to document the changes in each version of the library.
  • packages/google-cloud-ndb/CODE_OF_CONDUCT.md
    • Added CODE_OF_CONDUCT.md file to define the code of conduct for contributors.
  • packages/google-cloud-ndb/CONTRIBUTING.rst
    • Added CONTRIBUTING.rst file to provide guidelines for contributing to the project.
  • packages/google-cloud-ndb/LICENSE
    • Added LICENSE file to specify the Apache 2.0 license.
  • packages/google-cloud-ndb/MIGRATION_NOTES.md
    • Added MIGRATION_NOTES.md file to provide notes for migrating from the Python 2 version of NDB.
  • packages/google-cloud-ndb/README.md
    • Added README.md file to provide an overview of the NDB client library.
  • packages/google-cloud-ndb/SECURITY.md
    • Added SECURITY.md file to define the security policy for reporting security issues.
  • packages/google-cloud-ndb/docs/Makefile
    • Added Makefile to define the build process for Sphinx documentation.
  • packages/google-cloud-ndb/docs/blobstore.rst
    • Added blobstore.rst file to document the blobstore module.
  • packages/google-cloud-ndb/docs/client.rst
    • Added client.rst file to document the client module.
  • packages/google-cloud-ndb/docs/conf.py
    • Added conf.py file to configure the Sphinx documentation.
  • packages/google-cloud-ndb/docs/context.rst
    • Added context.rst file to document the context module.
  • packages/google-cloud-ndb/docs/django-middleware.rst
    • Added django-middleware.rst file to document the Django middleware.
  • packages/google-cloud-ndb/docs/exceptions.rst
    • Added exceptions.rst file to document the exceptions module.
  • packages/google-cloud-ndb/docs/global_cache.rst
    • Added global_cache.rst file to document the global_cache module.
  • packages/google-cloud-ndb/docs/index.rst
    • Added index.rst file as the main documentation file.
  • packages/google-cloud-ndb/docs/key.rst
    • Added key.rst file to document the key module.
  • packages/google-cloud-ndb/docs/metadata.rst
    • Added metadata.rst file to document the metadata module.
  • packages/google-cloud-ndb/docs/migrating.rst
    • Added migrating.rst file to provide migration notes.
  • packages/google-cloud-ndb/docs/model.rst
    • Added model.rst file to document the model module.
  • packages/google-cloud-ndb/docs/msgprop.rst
    • Added msgprop.rst file to document the msgprop module.
  • packages/google-cloud-ndb/docs/polymodel.rst
    • Added polymodel.rst file to document the polymodel module.
  • packages/google-cloud-ndb/docs/query.rst
    • Added query.rst file to document the query module.
  • packages/google-cloud-ndb/docs/spelling_wordlist.txt
    • Added spelling_wordlist.txt file to define a custom spelling wordlist.
  • packages/google-cloud-ndb/docs/stats.rst
    • Added stats.rst file to document the stats module.
  • packages/google-cloud-ndb/docs/tasklets.rst
    • Added tasklets.rst file to document the tasklets module.
  • packages/google-cloud-ndb/google/cloud/ndb/init.py
    • Added init.py file to define the google.cloud.ndb package.
  • packages/google-cloud-ndb/google/cloud/ndb/_batch.py
    • Added _batch.py file to define batching operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_cache.py
    • Added _cache.py file to define caching operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_datastore_api.py
    • Added _datastore_api.py file to define Datastore API operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_datastore_query.py
    • Added _datastore_query.py file to define Datastore query operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_legacy_entity_pb.py
    • Added _legacy_entity_pb.py file to define legacy entity protocol buffer operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_options.py
    • Added _options.py file to define options for NDB operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_remote.py
    • Added _remote.py file to define remote call operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_retry.py
    • Added _retry.py file to define retry operations.
  • packages/google-cloud-ndb/google/cloud/ndb/_transaction.py
    • Added _transaction.py file to define transaction operations.
  • packages/google-cloud-ndb/google/cloud/ndb/blobstore.py
    • Added blobstore.py file to define blobstore operations.
  • packages/google-cloud-ndb/google/cloud/ndb/client.py
    • Added client.py file to define the NDB client.
  • packages/google-cloud-ndb/google/cloud/ndb/context.py
    • Added context.py file to define the NDB context.
  • packages/google-cloud-ndb/google/cloud/ndb/django_middleware.py
    • Added django_middleware.py file to define Django middleware.
  • packages/google-cloud-ndb/google/cloud/ndb/exceptions.py
    • Added exceptions.py file to define NDB exceptions.
  • packages/google-cloud-ndb/google/cloud/ndb/global_cache.py
    • Added global_cache.py file to define global cache operations.
  • packages/google-cloud-ndb/google/cloud/ndb/key.py
    • Added key.py file to define key operations.
  • packages/google-cloud-ndb/google/cloud/ndb/metadata.py
    • Added metadata.py file to define metadata operations.
  • packages/google-cloud-ndb/google/cloud/ndb/model.py
    • Added model.py file to define model operations.
  • packages/google-cloud-ndb/google/cloud/ndb/msgprop.py
    • Added msgprop.py file to define message property operations.
  • packages/google-cloud-ndb/google/cloud/ndb/polymodel.py
    • Added polymodel.py file to define polymodel operations.
  • packages/google-cloud-ndb/google/cloud/ndb/query.py
    • Added query.py file to define query operations.
  • packages/google-cloud-ndb/google/cloud/ndb/stats.py
    • Added stats.py file to define statistics operations.
  • packages/google-cloud-ndb/google/cloud/ndb/tasklets.py
    • Added tasklets.py file to define tasklet operations.
  • packages/google-cloud-ndb/google/cloud/ndb/utils.py
    • Added utils.py file to define utility operations.
  • packages/google-cloud-ndb/google/cloud/ndb/version.py
    • Added version.py file to define the library version.
Activity
  • The pull request involves migrating the codebase from googleapis/python-ndb to packages/google-cloud-ndb.
  • The author requests a merge-commit to preserve git history.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
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 migrates the python-ndb code into the packages/google-cloud-ndb directory, including source code, documentation, and CI/CD configuration files. The changes are extensive as they involve adding a complete new package. I've identified a critical syntax error in a shell script that needs to be addressed.

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-ndb/.kokoro/build.sh (43-57)

critical

There appears to be a syntax error here. The if statement on line 43 is nested inside the then block of the if statement on line 39, but it's not properly structured as a nested if. This will cause a syntax error when the script is executed.

To fix this, the inner if block should be fully contained within the then...fi block of the outer if. The logic seems to be that if a project-id.json file exists, the PROJECT_ID is set, and then if a service-account.json also exists, further setup is performed. The corrected structure ensures this logic is executed correctly.

  if [[ -f "${KOKORO_GFILE_DIR}/service-account.json" ]]; then
    # Configure local Redis to be used
    export REDIS_CACHE_URL=redis://localhost
    redis-server &

    # Configure local memcached to be used
    export MEMCACHED_HOSTS=127.0.0.1
    service memcached start

    # Some system tests require indexes. Use gcloud to create them.
    gcloud auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS --project=$PROJECT_ID
    gcloud --quiet --verbosity=debug datastore indexes create tests/system/index.yaml
  fi
fi

@parthea parthea self-assigned this Mar 2, 2026
@parthea parthea added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.