-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Enable FDC API in firebase init dataconnect
for Spark projects
#8927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @fredzqm, 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 streamlines the setup process for Firebase Data Connect within Spark projects by ensuring the necessary Data Connect API is automatically enabled during the firebase init dataconnect
command execution. This change simplifies the developer experience by reducing manual configuration steps.
Highlights
- API Provisioning: The Firebase Data Connect (FDC) API is now automatically provisioned when initializing a Firebase project for Spark projects via
firebase init dataconnect
.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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 or fill out our survey to provide feedback.
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
-
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. ↩
There was a problem hiding this 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 enables the Firebase Data Connect API for Spark projects during firebase init dataconnect
.
@@ -12,6 +12,7 @@ export async function ensureApis(projectId: string): Promise<void> { | |||
export async function ensureSparkApis(projectId: string): Promise<void> { | |||
// These are the APIs that can be enabled without a billing account. | |||
await ensure(projectId, api.cloudSQLAdminOrigin(), prefix); | |||
await ensure(projectId, api.dataconnectOrigin(), prefix); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider executing these ensure
calls in parallel using Promise.all
, as they are independent network operations. This could potentially speed up the init
process.
await ensure(projectId, api.dataconnectOrigin(), prefix); | |
await Promise.all([ | |
ensure(projectId, api.cloudSQLAdminOrigin(), prefix), | |
ensure(projectId, api.dataconnectOrigin(), prefix), | |
]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a change log entry
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8927 +/- ##
==========================================
- Coverage 52.18% 50.68% -1.50%
==========================================
Files 418 496 +78
Lines 30694 32879 +2185
Branches 6348 6831 +483
==========================================
+ Hits 16018 16666 +648
- Misses 13234 14745 +1511
- Partials 1442 1468 +26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Fix apptesting enablement (#8905) * Fix an issue with apptesting enablement Co-authored-by: Joe Hanley <[email protected]> * Fix issue where login didnt work as expected on studio (#8914) * Fix issue where login didnt work as expected on studio * Update src/commands/login.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * 14.11.2 * [firebase-release] Removed change log and reset repo after 14.11.2 release * Enable FDC API in `firebase init dataconnect` for Spark projects (#8927) * feat: address pr comments on app-* commands * Fetch active Firebase Project from Studio Workspace when running in Studio (#8904) * Disable broken VSCode integration tests (#8934) * Add userinfo.email scope when in studio (#8935) * Add userinfo.email scope when in studio * Update src/requireAuth.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update src/requireAuth.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * feat: Display Firestore database edition (#8926) * feat: Display Firestore database edition Adds the 'Edition' to the output of the `firestore:databases:get` command. The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table. The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`. * feat: Display Firestore database edition Adds the 'Edition' to the output of the `firestore:databases:get` command. The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table. The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`. * feat: Display Firestore database edition Adds the 'Edition' to the output of the `firestore:databases:get` command. The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table. The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`. Also refactors the tests for `prettyPrintDatabase` to improve readability and maintainability. * feat: Display Firestore database edition Adds the 'Edition' to the output of the `firestore:databases:get` command. The `Database` resource in the Firestore API now includes a `databaseEdition` field. This change updates the `DatabaseResp` type to include this new field and modifies the `prettyPrintDatabase` function to display the database edition in the output table. The possible values for the edition are `STANDARD` and `ENTERPRISE`. If the edition is not specified or is `DATABASE_EDITION_UNSPECIFIED`, it will default to `STANDARD`. Also refactors the tests for `prettyPrintDatabase` to improve readability and maintainability and adds a test case for the `STANDARD` edition. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * Formatted --------- Co-authored-by: Jake Ouellette <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Google Open Source Bot <[email protected]> Co-authored-by: Fred Zhang <[email protected]> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: Sam Edson <[email protected]> Co-authored-by: Ehsan <[email protected]>
Existing behavior
Scenarios Tested
Sample Commands