Support Environment Variables for Local Builds#10192
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
…ctually a local build (instead of assuming true.)
…ore strictly. We also remove some hardcoded values and we generalize the code so that it does not affect source deploys. The goal is to prepare this PR so that we can safely submit it to main (behind the experiment flag.)
…ive. Only run it if it's a local build and the local build experiment flag is enabled.
… explicitly state an availability
There was a problem hiding this comment.
Code Review
This pull request introduces logic to split environment variables into build and runtime categories and injects Firebase configuration (autoinit variables) into the local build process for App Hosting backends. Key changes include the addition of the splitEnvVars utility, updates to localBuild to handle process environment injection and restoration, and logic in the prepare phase to fetch and merge web app configurations. I have no feedback to provide as the existing review comment was purely evaluative and did not point out an issue or improvement opportunity.
…ols into zip_deploy_env_vars
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces functionality to split environment variables into build and runtime categories and injects Firebase SDK auto-init variables during local builds. Feedback focuses on improving the robustness of error handling when loading configurations and refining type definitions for environment variable values to avoid unnecessary type assertions in tests.
|
I have verified this one last time after our fixes. |
Description
Adds support for Environment Variables (from apphosting.yaml files, for example) and AutoInit Env Vars for Local Builds.
This correctly splits Build vs Runtime env vars. It passes build env vars to the build process and passes runtime env vars to the control plane when creating the build. It injects the SDK AutoInit env vars into both.
Scenarios Tested
firebase deploySample Commands