Conversation
Despite us getting a quota bump, we continue to see errors related to creating instances, for example: https://source.cloud.google.com/results/invocations/7a40c996-e090-495d-945f-8d74f67d8473/targets/cloud-devrel%2Fclient-libraries%2Fpython%2Fgoogleapis%2Fpython-spanner-django%2Fpresubmit%2Fworker_0/log panic: rpc error: code = ResourceExhausted desc = Project 1065521786570 cannot add 1 nodes in region us-west2. This change lookups the zone and then extrapolates the region to use when creating the Cloud Spanner instance.
Regression in ff3f43d897c54e3a678811d4f076956975ec721a. fixes #427
Also while here, fixed a typo in a setting field for `DATABASES`
that used
DATABASE
instead of
NAME
for the name of the database.
Fixes #433
… INT64 columns' limitation refs #331
This reverts commit 7959874a6f09da750533d10f90d94320e082be76. fixes #444
fixes #227 Co-authored-by: Emmanuel T Odeke <emmanuel@orijtech.com>
This is the way release-please currently expects the version to be declared. https://github.com/googleapis/release-please/blob/4e0bf11b7f4217b5c6b8cd1aa9ea4db1bce06b89/src/updaters/python/setup-py.ts#L36
* chore: add renovate.json Co-authored-by: skuruppu <skuruppu@google.com>
* feat: add PyPI release support * fix: update package name Fixes #455 * deps: remove dependency on google-cloud * chore: added extra fields to setup.py * fix: single-source the version * fix: made setup.py consistent with client lib * fix: removed comment that no longer applies * fix: only support python version >=3.5 * add missing os import * add missing io import * fix README file extension * add missing pkg_resources import * fix import ordering Co-authored-by: larkee <larkee@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Towards googleapis/librarian#2460 --------- Co-authored-by: ohmayr <omairn@google.com>
…/main' into migration.python-spanner-django.migration.2026-03-06_19-24-38.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 undertakes a significant structural reorganization by migrating the 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-spanner-django library into the monorepo. The changes are extensive as they include the entire codebase and configuration files. My review focused on identifying potential issues introduced during the migration, such as outdated configurations, inconsistencies, and minor bugs. I've found several issues, primarily in the CI/CD configuration files, where incorrect paths could lead to build failures. I've also noted some critical inconsistencies in documentation regarding Python version requirements, which have been highlighted with reference to repository guidelines on breaking changes. Additionally, there are a few minor code improvements. Overall, the migration looks good, but these issues should be addressed to ensure a smooth transition and maintainability.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/django-google-spanner/.kokoro/samples/python3.10/periodic-head.cfg (9-10)
The TRAMPOLINE_BUILD_FILE path appears to be incorrect. It points to a file in the python-pubsub repository, which is likely a copy-paste error. It should probably point to a file within the python-spanner-django repository, such as .kokoro/test-samples-against-head.sh.
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-spanner-django/.kokoro/test-samples-against-head.sh"
packages/django-google-spanner/.kokoro/samples/python3.6/periodic-head.cfg (9-10)
The TRAMPOLINE_BUILD_FILE path appears to be incorrect. It points to a file in the python-pubsub repository, which is likely a copy-paste error. It should probably point to a file within the python-spanner-django repository, such as .kokoro/test-samples-against-head.sh.
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-spanner-django/.kokoro/test-samples-against-head.sh"
packages/django-google-spanner/.kokoro/samples/python3.7/periodic-head.cfg (9-10)
The TRAMPOLINE_BUILD_FILE path appears to be incorrect. It points to a file in the python-pubsub repository, which is likely a copy-paste error. It should probably point to a file within the python-spanner-django repository, such as .kokoro/test-samples-against-head.sh.
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-spanner-django/.kokoro/test-samples-against-head.sh"
packages/django-google-spanner/.kokoro/samples/python3.8/periodic-head.cfg (9-10)
The TRAMPOLINE_BUILD_FILE path appears to be incorrect. It points to a file in the python-pubsub repository, which is likely a copy-paste error. It should probably point to a file within the python-spanner-django repository, such as .kokoro/test-samples-against-head.sh.
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-spanner-django/.kokoro/test-samples-against-head.sh"
packages/django-google-spanner/.kokoro/samples/python3.9/periodic-head.cfg (9-10)
The TRAMPOLINE_BUILD_FILE path appears to be incorrect. It points to a file in the python-pubsub repository, which is likely a copy-paste error. It should probably point to a file within the python-spanner-django repository, such as .kokoro/test-samples-against-head.sh.
key: "TRAMPOLINE_BUILD_FILE"
value: "github/python-spanner-django/.kokoro/test-samples-against-head.sh"
packages/django-google-spanner/README.rst (72)
The README states that the minimum required Python version is 3.6. However, setup.py specifies python_requires=">=3.8". This inconsistency is critical. Given the setup.py configuration, the README should be updated to state Python 3.8 as the minimum version. Note that changing the minimum supported Python version is a breaking change in environment requirements, which typically warrants a minor version bump to allow for patching previous versions, as per repository guidelines.
The minimum required Python version is 3.8.
References
- Updating the minimum supported Python version from 3.6 to 3.8 constitutes a breaking change in environment requirements. Repository guidelines suggest a minor version bump for such changes to ensure proper versioning and support for users on older environments.
packages/django-google-spanner/setup.py (74)
The python_requires is set to >=3.8, which contradicts the README that states Python 3.6 is the minimum supported version. This inconsistency is critical. Please ensure all documentation and configuration files are consistent regarding the minimum Python version. If the minimum Python version is indeed 3.8, this represents a breaking change in environment requirements, which typically warrants a minor version bump to allow for patching previous versions, as per repository guidelines.
References
- Updating the minimum supported Python version from 3.6 to 3.8 constitutes a breaking change in environment requirements. Repository guidelines suggest a minor version bump for such changes to ensure proper versioning and support for users on older environments.
packages/django-google-spanner/.github/workflows/integration-tests-against-emulator-3.10.yml (21)
There's a typo in the step name. It should be "Set up Python 3.10" to match the Python version being set up in this workflow.
- name: Set up Python 3.10packages/django-google-spanner/CHANGELOG.md (7)
The release date (2025-06-05) is in the future. This is likely a typo and should be corrected to the actual release date.
packages/django-google-spanner/django_spanner/init.py (70-75)
The comments on lines 72 and 74 refer to a DISABLE_RANDOM_ID_GENERATION setting, but the code uses RANDOM_ID_GENERATION_ENABLED. To avoid confusion, the comments should be updated to use the correct setting name.
packages/django-google-spanner/django_spanner/base.py (155)
The user_agent is hardcoded to an old version string "django_spanner/2.2.0a1". This should be dynamically set using the __version__ from django_spanner.version to ensure it's always up-to-date. You'll need to import __version__ from .version at the top of the file.
"user_agent": f"django_spanner/{__version__}",
c80102c to
241ad70
Compare
241ad70 to
4b0b3b4
Compare
See #10953.
This PR should be merged with a merge-commit, not a squash-commit, in order to preserve the git history.