Skip to content

chore: librarian update image pull request: 20260213T202206Z#1169

Open
parthea wants to merge 1 commit intomainfrom
librarian-20260213T202206Z
Open

chore: librarian update image pull request: 20260213T202206Z#1169
parthea wants to merge 1 commit intomainfrom
librarian-20260213T202206Z

Conversation

@parthea
Copy link
Contributor

@parthea parthea commented Feb 13, 2026

feat: update image to us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021

…prod/images-prod/python-librarian-generator@sha256:a38add811f7f139d6a385b22d283ad09ef305b8cf50382ef62f0ce690787f021
@parthea parthea requested review from a team as code owners February 13, 2026 20:22
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: firestore Issues related to the googleapis/python-firestore API. labels Feb 13, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @parthea, 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 primarily focuses on maintenance and code hygiene by updating the librarian image used for code generation and standardizing import statements across the Firestore client libraries. It also includes minor refactorings in client credential loading and protobuf message serialization within REST transports, enhancing consistency and potentially compatibility with newer library versions.

Highlights

  • Librarian Image Update: The librarian image used for generation has been updated to a new SHA256 hash, reflecting recent changes or improvements in the generation process.
  • Import Statement Standardization: Numerous Python files across firestore_admin_v1 and firestore_v1 services and types have had their import statements for google.protobuf and google.api_core modules standardized, changing from X import Y to import X.Y as Y or import X as Y for consistency.
  • Client Credential Loading Refactoring: The from_service_account_info and from_service_account_file methods in async clients, as well as the credential loading logic in base transports, have been refactored for improved readability and maintainability, explicitly passing scopes and default_scopes.
  • Protobuf Message Serialization Update: REST transports now utilize type(request).to_json(request) instead of json_format.MessageToJson(request) for serializing protobuf messages to JSON, aligning with updated best practices or library versions.
Changelog
  • .librarian/state.yaml
    • Updated the image field to a new SHA256 hash for the python-librarian-generator.
  • google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py
    • Removed direct google.api_core.operation and operation_async imports.
    • Changed from google.protobuf imports to import google.protobuf.<module> as <alias> style.
    • Refactored from_service_account_info and from_service_account_file methods to use a temporary variable for __func__.
  • google/cloud/firestore_admin_v1/services/firestore_admin/client.py
    • Removed direct google.api_core.operation and operation_async imports.
    • Changed from google.protobuf imports to import google.protobuf.<module> as <alias> style.
  • google/cloud/firestore_admin_v1/services/firestore_admin/transports/base.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
    • Refactored credential loading in __init__ to pass scopes and default_scopes directly.
  • google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_admin_v1/services/firestore_admin/transports/grpc_asyncio.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_admin_v1/services/firestore_admin/transports/rest.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
    • Updated protobuf message serialization from json_format.MessageToJson(request) to type(request).to_json(request) in multiple methods.
  • google/cloud/firestore_admin_v1/services/firestore_admin/transports/rest_base.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_admin_v1/types/backup.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • google/cloud/firestore_admin_v1/types/database.py
    • Changed from google.protobuf imports to import google.protobuf.<module> as <alias> style.
  • google/cloud/firestore_admin_v1/types/firestore_admin.py
    • Changed from google.protobuf imports to import google.protobuf.<module> as <alias> style.
  • google/cloud/firestore_admin_v1/types/operation.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • google/cloud/firestore_admin_v1/types/schedule.py
    • Changed from google.protobuf and from google.type imports to import google.protobuf.<module> as <alias> and import google.type.<module> as <alias> style.
  • google/cloud/firestore_admin_v1/types/snapshot.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • google/cloud/firestore_admin_v1/types/user_creds.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • google/cloud/firestore_bundle/types/bundle.py
    • Changed from google.cloud.firestore_v1.types and from google.protobuf imports to import google.firestore.v1.<module> as <alias> and import google.protobuf.<module> as <alias> style.
  • google/cloud/firestore_v1/services/firestore/async_client.py
    • Changed from google.protobuf and from google.rpc imports to import google.protobuf.<module> as <alias> and import google.rpc.<module> as <alias> style.
    • Refactored from_service_account_info and from_service_account_file methods to use a temporary variable for __func__.
  • google/cloud/firestore_v1/services/firestore/client.py
    • Changed from google.protobuf and from google.rpc imports to import google.protobuf.<module> as <alias> and import google.rpc.<module> as <alias> style.
  • google/cloud/firestore_v1/services/firestore/transports/base.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
    • Refactored credential loading in __init__ to pass scopes and default_scopes directly.
  • google/cloud/firestore_v1/services/firestore/transports/grpc.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_v1/services/firestore/transports/grpc_asyncio.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_v1/services/firestore/transports/rest.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
    • Updated protobuf message serialization from json_format.MessageToJson(request) to type(request).to_json(request) in multiple methods.
  • google/cloud/firestore_v1/services/firestore/transports/rest_base.py
    • Changed from google.protobuf import empty_pb2 to import google.protobuf.empty_pb2 as empty_pb2.
  • google/cloud/firestore_v1/types/common.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • google/cloud/firestore_v1/types/document.py
    • Changed from google.protobuf and from google.type imports to import google.protobuf.<module> as <alias> and import google.type.<module> as <alias> style.
  • google/cloud/firestore_v1/types/explain_stats.py
    • Changed from google.protobuf import any_pb2 to import google.protobuf.any_pb2 as any_pb2.
  • google/cloud/firestore_v1/types/firestore.py
    • Changed from google.protobuf and from google.rpc imports to import google.protobuf.<module> as <alias> and import google.rpc.<module> as <alias> style.
  • google/cloud/firestore_v1/types/query.py
    • Changed from google.protobuf import wrappers_pb2 to import google.protobuf.wrappers_pb2 as wrappers_pb2.
  • google/cloud/firestore_v1/types/query_profile.py
    • Changed from google.protobuf imports to import google.protobuf.<module> as <alias> style.
  • google/cloud/firestore_v1/types/write.py
    • Changed from google.protobuf import timestamp_pb2 to import google.protobuf.timestamp_pb2 as timestamp_pb2.
  • tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py
    • Added imports for Sequence and Mapping from collections.abc.
    • Removed google.api_core.operation_async import.
    • Changed from google.protobuf and from google.type imports to import google.protobuf.<module> as <alias> and import google.type.<module> as <alias> style.
  • tests/unit/gapic/firestore_v1/test_firestore.py
    • Added imports for Sequence and Mapping from collections.abc.
    • Changed from google.protobuf and from google.type imports to import google.protobuf.<module> as <alias> and import google.type.<module> as <alias> style.
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 updates the generator image and applies the resulting changes to the generated code. The updates primarily consist of import refactoring to use absolute paths, making credential loading arguments explicit in the transport layer, and transitioning to proto-plus's to_json method for serialization in the REST transport. These changes enhance code clarity and align with current generator standards. The refactoring of service account factory methods in the async clients also improves readability by avoiding excessively long lines. The changes appear correct and consistent with the latest generator standards, maintaining the existing functionality of the library.

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: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments