Add improvements to local build / zip deploy#9925
Add improvements to local build / zip deploy#9925falahat wants to merge 13 commits intozip-deployfrom
Conversation
…to the local build process
1. Fix for injecting auto-init variables into the build 2. Fixes how we handle dependencies, nodejs paths, modulepaths, etc. This needs closer attention/fixes. 3. Adds env var handling (not secrets) and determines which env vars to pass down to the build
… variants) and include them in the final artifact
…zip_deploy_aryanf
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello @falahat, 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 introduces a suite of enhancements across Firebase CLI's local development, deployment, and integration capabilities. It focuses on improving the developer experience for App Hosting, Cloud Functions, and the VSCode extension, while also expanding the CLI's functionality for managing Firebase Authentication and integrating with AI agents. The changes aim to provide more robust error handling, better configuration management, and streamlined workflows for various Firebase services. Highlights
🧠 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
Ignored Files
Activity
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 substantial improvements to the local build and deployment process for App Hosting. Key changes include full support for deploying local builds, switching to .tar.gz for source archives, automatic injection of Firebase SDK configuration for local builds, and enhancing security by enabling Uniform Bucket-Level Access on source buckets. The code is well-structured, with good refactoring to improve modularity and reuse. I've identified a potential issue with how locallyBuiltSource is being set and a minor point for improvement. Overall, this is a great enhancement.
| userStorageUri: context.backendStorageUris[backendId], | ||
| rootDirectory: context.backendConfigs[backendId].rootDir, | ||
| locallyBuiltSource: true, // generalize | ||
| locallyBuiltSource: true, // generalize |
There was a problem hiding this comment.
The locallyBuiltSource flag is hardcoded to true, which seems incorrect for backends that are deployed from source but not pre-built locally (i.e., where cfg.localBuild is false). For those cases, the backend service should perform the build, so locallyBuiltSource should be false. The value should be determined based on whether the backend was configured for a local build.
| locallyBuiltSource: true, // generalize | |
| locallyBuiltSource: !!context.backendLocalBuilds[backendId], |
| const zippedSourcePath = await createTarArchive(cfg, rootDir, builtAppDir); | ||
| const zippedSourcePath = await util.createTarArchive(cfg, rootDir, builtAppDir); | ||
| logLabeledBullet( | ||
| "apphosting....", |
Description
Scenarios Tested
Sample Commands