Prototype Tool to Create Cloud Run Apps with Firebase CLI - #10898
Prototype Tool to Create Cloud Run Apps with Firebase CLI#10898falahat wants to merge 24 commits into
Conversation
…veiwed by humans and brought up to bar. Testing: This was tested manually by deploying a Cloud Run app
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
There was a problem hiding this comment.
Code Review
This pull request introduces support for configuring and deploying Cloud Run services via the Firebase CLI, including integration with App Hosting configurations, initialization features, and end-to-end tests. The feedback highlights several critical issues: hardcoded absolute paths in the E2E test script, a bug in constructing the secret resource path for Cloud Run environment variables, and a violation of best practices regarding revision-level versus service-level scaling. Additionally, the modification to updateService in src/gcp/runv2.ts is flagged as highly risky for existing Cloud Functions v2 deployments. Finally, the reviewer recommends removing an accidentally committed backup file (deploy.ts.bak), adding validation for serviceId, and adhering to the repository style guide by throwing FirebaseError instead of generic Error objects.
Do Not read apphosting.local.yaml by accident Add timeout to artifact registry actions Track Cloud Build operations/results better
* Deduplicated Test CLI Process Wrapper * Standardized Secret Name Parsing * Standardized GCP API Verification * Resolved RunConfig Type Naming Collisions * Materialized Target Configuration & Target Filtering * Updated firebase.json schema to include the "run" section * Cleaned Init Feature Scaffolding * Gated ABIU Base Image Updates
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for deploying Cloud Run services via the Firebase CLI, adding configuration schemas, initialization prompts, deployment lifecycle hooks, and an E2E test suite. The code reviewer provided valuable feedback focused on aligning the implementation with repository style guides. Key recommendations include replacing manual polling loops with the central pollOperation utility, avoiding the use of the :latest tag for container images to prevent deployment overwrites, eliminating as any type casts by properly typing options and configurations, and ensuring FirebaseError throws specify non-zero exit codes for precondition violations.
…runtime (i.e. during the interactive CLI flow) but after that the internal methods do not allow optional parameters for values like the service region. This makes it less likely to silently use a default value instead of the user-provided one.
…d Run already stores them on the service object.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for configuring and deploying Cloud Run services directly via the Firebase CLI, including integration with apphosting.yaml settings such as scaling, VPC access, and environment variables. Feedback on the changes highlights three critical issues: defaulting supportGitIgnore to true in archiveDirectory is a breaking change that could affect other deploy targets; the lifecycle hook filtering for run will incorrectly reject configurations when deploying with --only run; and polling Cloud Build by extracting a buildId is fragile and should be replaced by polling the buildOperation resource directly.
This initial draft was ai-generated and must still be reviewed carefully by humans. It has been tested manually:
Description
Scenarios Tested
Sample Commands