feat(firestore): Added Firestore Multi Database Support#733
feat(firestore): Added Firestore Multi Database Support#733jonathanedey merged 7 commits intodevfrom
Conversation
Summary of ChangesHello @jonathanedey, 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 significantly enhances the Firestore client by introducing support for multiple named databases. It provides a new API method, Highlights
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 introduces support for multiple Cloud Firestore databases by adding a new FirestoreWithDatabase function. The implementation is accompanied by comprehensive unit and integration tests. My feedback focuses on improving code maintainability by addressing code duplication and enhancing the robustness of the integration tests to ensure proper resource cleanup.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for multiple named databases in Cloud Firestore by adding a FirestoreWithDatabase method. The implementation maintains backward compatibility by having the existing Firestore method call the new one with the default database ID. The changes are well-tested with new unit and integration tests. My review includes a couple of suggestions for the new integration tests to improve maintainability and adhere to Go's testing best practices.
lahirumaramba
left a comment
There was a problem hiding this comment.
Thank you! Added a few comments.
| } | ||
| } | ||
|
|
||
| func TestFirestoreMultiDB(t *testing.T) { |
There was a problem hiding this comment.
This feels repetitive. Doesn't TestFirestoreWithDatabaseID and TestFirestore cover this?
There was a problem hiding this comment.
This test in for verifying that two databases clients can be opened and modified at once with no impact on the other.
There was a problem hiding this comment.
Okay. We can keep this, but as a clarification, to me this feels like we are trying to test the cloud firestore SDK here. This should be a more fitting test for the Firestore SDK and slightly beyond the Admin SDK scope. The Admin SDK should test the part where we are setting the database ID in the Firestore SDK and everything beyond that should be tested in the Firestore SDK itself (which I think they do).
lahirumaramba
left a comment
There was a problem hiding this comment.
Thanks! LGTM!
We should be good once we get a TW review.
| } | ||
| } | ||
|
|
||
| func TestFirestoreMultiDB(t *testing.T) { |
There was a problem hiding this comment.
Okay. We can keep this, but as a clarification, to me this feels like we are trying to test the cloud firestore SDK here. This should be a more fitting test for the Firestore SDK and slightly beyond the Admin SDK scope. The Admin SDK should test the part where we are setting the database ID in the Firestore SDK and everything beyond that should be tested in the Firestore SDK itself (which I think they do).
Co-authored-by: Lahiru Maramba <[email protected]>
* chore: Added and `AGENTS.md` file to instruct AI agents how to interact with this repository (#710) * fix(auth): Fixed auth error code parsing (#712) * fix(auth): Fixed auth error code parsing * fix(auth): Fixed test to use error message prefix * chore: update copyright headers from Google Inc. to Google LLC (#713) * chore: Update github actions workflows and integration test resources (#740) * chore: Pinned github actions to a full-length commit SHA * chore: Update integration test resources * chore: Added environment label to release action * Trigger integration tests * feat(firestore): Added Firestore Multi Database Support (#733) * feat(firestore): Add Firestore Multi Database Support * fix: Address gemini review * fix: gemini review * fix: Update name from API review * fix: Address review comments * chore: Fix CONTRIBUTING.md typo Co-authored-by: Lahiru Maramba <[email protected]> --------- Co-authored-by: Lahiru Maramba <[email protected]> * feat(auth): Add `QueryUsers` API (#727) This change implements the accounts:query functionality, providing a new QueryUsers method that allows searching for users with filters and sorting options. RELEASE_NOTE: Added QueryUsers() API to support querying user accounts with filters, sorting, and pagination. * Update the release actions process (#741) This PR refactors the release automation to improve security by removing the direct merge from the workflow. * [chore] Release 4.19.0 (#742) * Revert "[chore] Release 4.19.0 (#742)" (#744) This reverts commit 3a86709. * chore: Update Release Workflows for Push triggers (#745) * chore: Update release actions to run on Release env * Trigger CI * update the actions * update the base_ref * remove fetch-depth to prevent conflicts * [chore] Release 4.19.0 Take 2 (#746) --------- Co-authored-by: Jonathan Edey <[email protected]> Co-authored-by: Lahiru Maramba <[email protected]>
RELEASE NOTE: Added support for multiple Cloud Firestore named databases.