chore(migration): Migrate code from googleapis/python-ndb into packages/google-cloud-ndb#16009
chore(migration): Migrate code from googleapis/python-ndb into packages/google-cloud-ndb#16009
Conversation
Doc fix from #529
* 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
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>
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 ()
…n up related hacks (#585)
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>
* 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
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 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
Changelog
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 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)
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
See #10916.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.