Skip to content

Conversation

@aristide-n
Copy link

Description

Replace the Datastore and Firestore locational endpoints URL examples with regional endpoints URLs

Checklist

@aristide-n aristide-n requested review from a team as code owners October 16, 2025 03:17
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: datastore Issues related to the Datastore API. api: firestore Issues related to the Firestore API. labels Oct 16, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @aristide-n, 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 updates the example code for Google Cloud Datastore and Firestore to reflect current best practices for connecting to these services. Specifically, it replaces outdated locational endpoint URLs with the appropriate regional endpoint URLs in the provided Python snippets, ensuring the samples are accurate and functional.

Highlights

  • Datastore Endpoint Update: The Datastore regional endpoint example in datastore/cloud-client/snippets.py has been updated to use the new regional URL https://datastore.africa-south1.rep.googleapis.com instead of the older https://nam5-datastore.googleapis.com.
  • Firestore Endpoint Update: The Firestore regional endpoint example in firestore/cloud-client/snippets.py has been updated to use the new regional URL firestore.africa-south1.rep.googleapis.com instead of the older nam5-firestore.googleapis.com.
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
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 updates the example endpoint URLs for Datastore and Firestore to use regional endpoints instead of multi-regional ones. The changes are correct, but I've suggested a minor improvement in the Firestore snippet to add the https:// scheme to the endpoint URL for consistency and to follow API documentation.

def regional_endpoint():
# [START firestore_regional_endpoint]
ENDPOINT = "nam5-firestore.googleapis.com"
ENDPOINT = "firestore.africa-south1.rep.googleapis.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For consistency with the Datastore snippet in this same pull request, and to align with the google-api-core ClientOptions documentation (which states api_endpoint should be the full URL including the scheme), it's better to include the https:// prefix here.

Suggested change
ENDPOINT = "firestore.africa-south1.rep.googleapis.com"
ENDPOINT = "https://firestore.africa-south1.rep.googleapis.com"

from google.api_core.client_options import ClientOptions

ENDPOINT = "https://nam5-datastore.googleapis.com"
ENDPOINT = "https://datastore.africa-south1.rep.googleapis.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why these are changing from North America multi-regional to Johannesburg regional? Is it because we don't want to use us-central1 as default?

@glasnt glasnt added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 16, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: datastore Issues related to the Datastore API. api: firestore Issues related to the Firestore API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants