Skip to content

Conversation

@daniel-sanche
Copy link
Contributor

Catch back up with changes on main branch

@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: firestore Issues related to the googleapis/python-firestore API. labels Jan 9, 2026
@daniel-sanche daniel-sanche changed the base branch from main to pipeline-preview January 9, 2026 21:54
@daniel-sanche daniel-sanche changed the title chore: import main into pipeline_preview branch chore: import main into pipeline-preview branch Jan 9, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @daniel-sanche, 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 integrates a significant set of updates from the main branch into the pipeline_preview branch. The core changes revolve around expanding platform compatibility by adding Python 3.14 support and introducing a powerful new 'Pipelines' API for advanced data manipulation within Firestore. Additionally, a new clone_database method has been added to the Admin API, enhancing database management capabilities.

Highlights

  • Python 3.14 Support: Added comprehensive support for Python 3.14 across the codebase, including updated noxfile.py configurations for unit and system tests, and relevant classifiers in setup.py.
  • Firestore Pipelines API: Introduced a new 'Pipelines' feature, enabling complex data transformations and queries through a series of stages. This includes new classes like Pipeline, AsyncPipeline, PipelineSource, PipelineResult, PipelineExpressions, and PipelineStages for defining and executing multi-stage operations such as filtering, aggregation, and vector search.
  • CloneDatabase Feature: Added a new clone_database method to the Firestore Admin API, allowing users to create new Firestore databases by cloning existing ones, including their data and configuration. This feature is supported in both synchronous and asynchronous clients, and across gRPC and REST transports.
  • mTLS Client Certificate Handling: Enhanced the handling of mTLS client certificates in both the Firestore Admin and core Firestore clients, including a new _use_client_cert_effective static method to determine when client certificates should be used.
  • Code Generation and Build System Updates: Updated librarian.py to align with new code generation patterns, including changes to s.get_staging_dirs and s.move calls. noxfile.py and setup.py were also adjusted to reflect the new Python version support and pipeline-related dependencies.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/lint.yml
    • .github/workflows/mypy.yml
    • .github/workflows/system_emulated.yml
    • .github/workflows/unittest.yml
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

@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 brings the branch up to date with a large number of changes from the main branch. Key updates include adding support for Python 3.14, introducing new API methods like CloneDatabase and ExecutePipeline, and adding mTLS support. The code generation tooling has also been migrated from OwlBot to Librarian.

My review focuses on the manual changes and patterns in the generated code. I've found a critical issue in the REST transport implementation for streaming RPCs, where newly added logging code is unreachable. I've also noted a medium-severity issue in a test where a RuntimeWarning is suppressed, which could be handled more cleanly.

Overall, the changes are extensive and mostly look good, but the issue in the REST transport needs to be addressed.

Comment on lines +1183 to +1198
if CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor(
logging.DEBUG
): # pragma: NO COVER
http_response = {
"headers": dict(response.headers),
"status": response.status_code,
}
_LOGGER.debug(
"Received response for google.firestore_v1.FirestoreClient.batch_get_documents",
extra={
"serviceName": "google.firestore.v1.Firestore",
"rpcName": "BatchGetDocuments",
"metadata": http_response["headers"],
"httpResponse": http_response,
},
)

Choose a reason for hiding this comment

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

critical

This logging block appears to be unreachable. The __call__ method for _BatchGetDocuments is a generator that yields responses from within a loop. Any code after this loop, including this logging block, will not be executed. The logging should be performed inside the loop for each response that is yielded.

This same issue exists for _ExecutePipeline, _RunAggregationQuery, and _RunQuery in this file.

Comment on lines +377 to +379
@pytest.mark.filterwarnings(
"ignore:coroutine method 'aclose' of 'AsyncIter' was never awaited:RuntimeWarning"
)

Choose a reason for hiding this comment

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

medium

Suppressing this RuntimeWarning might hide a potential issue with resource management in the test. While this might be acceptable for this specific test, it would be better to explicitly close the async generator to avoid the warning and ensure resources are cleaned up properly. For example, you could explicitly call await stream.aclose() in a finally block.

@daniel-sanche daniel-sanche marked this pull request as ready for review January 10, 2026 01:26
@daniel-sanche daniel-sanche requested review from a team as code owners January 10, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/python-firestore API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants