Skip to content

Allow apphosting:backend:create to work with source deploy backends a…#10094

Draft
falahat wants to merge 6 commits intomainfrom
createSourceBackends
Draft

Allow apphosting:backend:create to work with source deploy backends a…#10094
falahat wants to merge 6 commits intomainfrom
createSourceBackends

Conversation

@falahat
Copy link
Contributor

@falahat falahat commented Mar 13, 2026

…s well. The current flow frustratingly forces you to set up Github connections.

Description

Scenarios Tested

Sample Commands

…s well. The current flow frustratingly forces you to set up Github connections.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 enhances the apphosting:backend:create command by providing users with the flexibility to choose their deployment method. Previously, creating a backend implicitly required linking a GitHub repository. With this change, users can now opt for local source deployment, streamlining the process for those who do not wish to integrate with GitHub, while still retaining the GitHub deployment option.

Highlights

  • Flexible Deployment Method Selection: Introduced a new prompt during backend creation that allows users to choose between 'GitHub' and 'Local Source' deployment methods, removing the previous mandatory GitHub connection requirement.
  • Source Deployment Support: Enabled the apphosting:backend:create command to successfully create backends for local source deployments, bypassing GitHub repository linking and branch prompting.
  • Conditional Rollout and Traffic Policy: Updated the logic to conditionally skip the rollout and default traffic policy setup if a GitHub branch is not provided, which is the case for local source deployments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/apphosting/backend.spec.ts
    • Added new imports for doSetup, githubConnections, webApps, ensureApiEnabled, and rollout.
    • Declared new Sinon stubs for ensure, linkGitHubRepository, promptGitHubBranch, getOrCreateWebApp, and orchestrateRollout.
    • Introduced a new test suite for doSetup that includes test cases for both source deployment and GitHub deployment scenarios, verifying the new conditional logic.
  • src/apphosting/backend.ts
    • Implemented a select prompt to allow users to choose between 'GitHub' and 'Local Source' deployment methods.
    • Conditionalized the GitHub repository linking and branch prompting based on the selected deployment method.
    • Adjusted the prompt message for the app's root directory.
    • Modified the condition for skipping rollout and default traffic policy to include cases where no branch is provided (i.e., for source deployments), in addition to non-interactive mode.
    • Removed the FirebaseError that was previously thrown if a branch was not set, as it is now a valid scenario for source deployments.
Activity
  • No human activity has been recorded on this pull request yet.
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 a valuable improvement by allowing apphosting:backend:create to support source-based deployments, removing the previous requirement to connect a GitHub repository. The changes are logical and well-implemented. The accompanying tests have been updated to cover both the new source deployment flow and the existing GitHub flow, ensuring good test coverage. I have one minor suggestion to remove a redundant log message to improve the command's output clarity for users.

@falahat
Copy link
Contributor Author

falahat commented Mar 13, 2026

/gemini review

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 extends the apphosting:backend:create command to support creating backends for local source deployments, in addition to the existing GitHub-based deployments. This is a great improvement for user experience. The changes involve adding a prompt to select the deployment method and adjusting the logic accordingly. New tests have been added to cover these new code paths.

I have a couple of points of feedback regarding the user interaction flow and a potentially unused variable for source deployments. Please see my detailed comments.

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.

2 participants