Skip to content

chore: complete google-cloud-firestore migration to librarian#16742

Open
jskeet wants to merge 4 commits intogoogleapis:mainfrom
jskeet:generate-firestore
Open

chore: complete google-cloud-firestore migration to librarian#16742
jskeet wants to merge 4 commits intogoogleapis:mainfrom
jskeet:generate-firestore

Conversation

@jskeet
Copy link
Copy Markdown
Contributor

@jskeet jskeet commented Apr 21, 2026

No description provided.

@jskeet jskeet requested a review from parthea April 21, 2026 07:22
@jskeet jskeet requested review from a team as code owners April 21, 2026 07:22
@jskeet
Copy link
Copy Markdown
Contributor Author

jskeet commented Apr 21, 2026

@parthea I've split this PR into multiple commits to make it clearer - it looks like all the changes come from either reformatting or regenerating with legacylibrarian. The deleted lines are worrying though - I'm not sure whether those are breaking changes or not.

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 transitions the google-cloud-firestore library to automated generation, updates the supported Python versions to 3.9 and above, and introduces an expiration_offset field to the TTL configuration. The update also removes several Pipeline and Vector Search exports from the public API, which appears to be a regression that could break existing user code. Additionally, there is an inconsistency between the TtlConfig docstring, which states that sub-second precision is rejected, and a unit test that includes nanoseconds in the offset.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/google-cloud-firestore/google/cloud/firestore/init.py (33-34)

high

The removal of AsyncPipeline and AsyncPipelineStream (along with other Pipeline-related exports like Pipeline, FindNearestOptions, and Ordering later in this file) appears to be a regression. These features were recently added to the Firestore SDK, and their removal from the public API will break existing user code. Please verify if these components should be preserved during the librarian migration.

packages/google-cloud-firestore/google/cloud/firestore_admin_v1/types/field.py (148-150)

medium

The docstring states that "Values more precise than seconds are rejected" for expiration_offset. However, the corresponding unit test in test_firestore_admin.py (line 20834) includes a nanos value ("nanos": 543). This inconsistency should be resolved: if the API indeed rejects sub-second precision, the test data should be updated to reflect this restriction; otherwise, the docstring should be corrected.

@jskeet
Copy link
Copy Markdown
Contributor Author

jskeet commented Apr 21, 2026

It looks like a lot of the changes in __init__.py were introduced in #16549 - I wonder whether this is a matter of modifying firestore-integration.yaml to reflect those changes? cc @daniel-sanche

Copy link
Copy Markdown
Contributor

@chalmerlowe chalmerlowe left a comment

Choose a reason for hiding this comment

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

LGTM, pending a fix for the failing system test.

@jskeet jskeet added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Apr 21, 2026
@jskeet jskeet requested a review from daniel-sanche April 21, 2026 09:27
AsyncCollectionReference,
AsyncDocumentReference,
AsyncPipeline,
AsyncPipelineStream,
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.

This file is autogenerated but it was manually edited in PR #16549. We'll need to update the post-processing file here to include the changes.

from google.cloud.firestore_v1.async_client import AsyncClient
from google.cloud.firestore_v1.async_collection import AsyncCollectionReference
from google.cloud.firestore_v1.async_document import AsyncDocumentReference
from google.cloud.firestore_v1.async_pipeline import AsyncPipeline
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.

This file is autogenerated but it was manually edited in PR #16549. We'll need to update the post-processing file here to include the changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Right, that was my thinking too. Will create a change for the post-processing file tomorrow.

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.

3 participants