Skip to content

Conversation

fredzqm
Copy link
Contributor

@fredzqm fredzqm commented Aug 2, 2025

Existing behavior

firebase init dataconnect

Screenshot 2025-08-01 at 4 58 30 PM

Scenarios Tested

firebase init dataconnect

Screenshot 2025-08-01 at 5 02 15 PM

Sample Commands

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.

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

  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 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Consider executing these ensure calls in parallel using Promise.all, as they are independent network operations. This could potentially speed up the init process.

Suggested change
await ensure(projectId, api.dataconnectOrigin(), prefix);
await Promise.all([
ensure(projectId, api.cloudSQLAdminOrigin(), prefix),
ensure(projectId, api.dataconnectOrigin(), prefix),
]);

Copy link
Member

@yuchenshi yuchenshi left a 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

@fredzqm fredzqm enabled auto-merge (squash) August 2, 2025 01:34
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.68%. Comparing base (f1c2d21) to head (fa0e94d).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
src/dataconnect/ensureApis.ts 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fredzqm fredzqm merged commit 879f023 into master Aug 2, 2025
106 of 112 checks passed
@fredzqm fredzqm deleted the fz/init-new-project branch August 2, 2025 04:37
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Aug 2, 2025
joehan added a commit that referenced this pull request Aug 5, 2025
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants