Skip to content

Prototype Tool to Create Cloud Run Apps with Firebase CLI - #10898

Open
falahat wants to merge 24 commits into
mainfrom
bapi_prototype
Open

Prototype Tool to Create Cloud Run Apps with Firebase CLI#10898
falahat wants to merge 24 commits into
mainfrom
bapi_prototype

Conversation

@falahat

@falahat falahat commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This initial draft was ai-generated and must still be reviewed carefully by humans. It has been tested manually:

Description

Scenarios Tested

Sample Commands

firebase init run
firebase deploy --only run --project xxx

…veiwed by humans and brought up to bar.

Testing: This was tested manually by deploying a Cloud Run app
@wiz-9635d3485b

wiz-9635d3485b Bot commented Aug 6, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 5 Medium 16 Low
Software Management Finding Software Management Findings -
Total 5 Medium 16 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread e2e_run_tests/run_all_tests.sh Outdated
Comment thread src/deploy/run/deploy.ts Outdated
Comment thread src/deploy/run/deploy.ts Outdated
Comment thread src/gcp/runv2.ts Outdated
Comment thread src/deploy/run/deploy.ts.bak Outdated
Comment thread src/deploy/run/prepare.ts Outdated
Comment thread src/deploy/run/prepare.ts
Comment thread src/init/features/run.ts Outdated
Comment thread src/init/features/run.ts
falahat added 7 commits August 7, 2026 10:33
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
@falahat

falahat commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread src/gcp/runv2.ts
Comment thread src/deploy/run/deploy.ts Outdated
Comment thread src/deploy/run/deploy.ts Outdated
Comment thread src/deploy/run/deploy.ts Outdated
Comment thread src/deploy/run/prepare.ts Outdated
Comment thread src/init/features/run.ts
Comment thread src/deploy/run/prepare.ts Outdated
Comment thread src/commands/init.ts Outdated
Comment thread src/commands/init.ts
Comment thread src/deploy/run/args.ts
Comment thread src/gcp/artifactregistry.ts Outdated
@falahat

falahat commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

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 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.

Comment thread src/archiveDirectory.ts Outdated
Comment thread src/deploy/lifecycleHooks.ts
Comment thread src/gcp/runv2.ts
Comment thread schema/firebase-config.json Outdated
Comment thread schema/firebase-config.json
Comment thread schema/firebase-config.json Outdated
Comment thread schema/firebase-config.json Outdated
Comment thread scripts/run-deploy-tests/run.sh
Comment thread src/gcp/runv2.ts
Comment thread src/gcp/runv2.ts
Comment thread src/archiveDirectory.ts Outdated
Comment thread src/fsAsync.ts Outdated
Comment thread package.json
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