Skip to content

Conversation

@tammam-g
Copy link
Contributor

@tammam-g tammam-g commented Nov 20, 2025

Description

Adds sql free trial creation and handling

Scenarios Tested

Create a free trial instance on spark account
image

Try to create a second free trial instance when a free trial instance exists
image

Delete free instance with gcloud and make sure we still can't create instance
image

Free trial in constraint location
image

Local flag for enabling instrumentless billing disabled
image

Free trial created on non whitelisted Blaze plan account (current common case):
image

Sample Commands

firebase experiments:enable fdcift && firebase init

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tammam-g, 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 integrates comprehensive support for Firebase Data Connect free trial instances. It modifies the Cloud SQL provisioning logic to allow for the creation of a single, no-cost Cloud SQL instance for projects without an active billing account. The changes also update the command-line interface's initialization process to guide users through selecting either a free trial or a paid instance, ensuring that the free trial is a one-time offering per project and providing clear upgrade instructions when necessary.

Highlights

  • Free Trial Introduction: This pull request introduces the ability to create a free trial Cloud SQL instance for Firebase Data Connect, allowing users to get started without immediate billing.
  • Billing Integration: The system now intelligently differentiates between creating a free trial instance and a paid instance based on the project's billing status, guiding users appropriately.
  • One-Time Free Trial Enforcement: Logic has been added to prevent the creation of multiple free trial instances for a single project, prompting users to upgrade to a paid plan if they attempt to provision another.
  • CLI Flow Updates: The firebase init command's Data Connect setup flow has been updated to offer free trial instance creation as an option and to enforce billing-related checks during the provisioning process.
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 introduces support for a free trial for Firebase Data Connect, which is a great addition. The changes correctly modify the init flow to handle free trial instance creation and add necessary checks for billing when creating paid instances. The tests have also been updated to reflect these new scenarios. I've found one medium-severity issue in the interactive prompt logic where a user isn't offered to create a new CloudSQL instance if none exist. I've provided a suggestion to fix this to improve the user experience. Overall, the changes are well-implemented.

);
}
if (args.freeTrialLabel === "ft" && !billingEnabled && !instrumentlessTrialEnabled) {
throw new FirebaseError(`You need an active billing account to create free trial instance`);
Copy link
Contributor

@fredzqm fredzqm Nov 20, 2025

Choose a reason for hiding this comment

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

[blocking] Include the old upgrade message here

"Local flag for enabling instrumentless billing disabled" case above should print the same message as in master branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, fixed we don't do anything here but during the prompting we will skip the whole flow here if billing isn't enabled (same behaviour as before)

@github-project-automation github-project-automation bot moved this to Changes Requested [PR] in [Cloud] Extensions + Functions Nov 20, 2025
@tammam-g tammam-g requested a review from fredzqm November 20, 2025 19:33
Copy link
Contributor

@fredzqm fredzqm left a comment

Choose a reason for hiding this comment

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

LGTM

@github-project-automation github-project-automation bot moved this from Changes Requested [PR] to Approved [PR] in [Cloud] Extensions + Functions Nov 20, 2025
@tammam-g tammam-g enabled auto-merge (squash) November 20, 2025 21:59
@tammam-g tammam-g requested review from fredzqm and removed request for annzimmer November 20, 2025 22:51
@tammam-g tammam-g merged commit 67362a2 into master Nov 20, 2025
48 checks passed
@tammam-g tammam-g deleted the tammam/fdc-iftrial branch November 20, 2025 23:40
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Nov 20, 2025
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.

3 participants