deploy: pre-flight Blaze-tier check + surface tier requirement in firebase init (avoid wasted deploys)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu trong src/deploy/functions/prepare.ts và theo dõi cách quá trình chuẩn bị deployment kích hoạt các bản build, sau đó kiểm tra src/deploy/functions/ensure.ts và nodeBillingError để tìm lỗi Blaze hiện có. So sánh luồng billing với src/extensions/checkProjectBilling.ts và src/dataconnect/provisionCloudSql.ts, rồi xem xét src/init/features/** để tìm các lời nhắc về tính năng. Hoàn thành có nghĩa là các deployment đủ điều kiện sẽ thất bại trước khi thực hiện công việc build và các lựa chọn init yêu cầu Blaze sẽ hiển thị ghi chú được chỉ định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Which command?
deploy
Version info
firebase-tools 15.22.3
Platform
All (behaviour is deploy-time-only, platform-independent)
CLI/emulator log
Error: Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan. To upgrade your project, visit the following URL:
https://console.firebase.google.com/project/<PROJECT>/usage/details
Reproduction steps
- On a project on the free Spark plan, run
firebase init functions(or add Cloud Functions, Extensions, or a Data Connect service). - Write code. Run
firebase deploy. - Deploy proceeds through TS/JS build, packaging, artifact upload, and only then — after minutes of work — fails at
cloudBuildEnabled(seesrc/deploy/functions/ensure.ts,nodeBillingError) with the Blaze-required error.
The same pattern exists for Extensions (src/extensions/checkProjectBilling.ts) and Data Connect / Cloud SQL provisioning (src/dataconnect/provisionCloudSql.ts calls cloudbilling.checkBillingEnabled). Each surface only detects the tier mismatch after significant work — never at firebase init time, and never up-front in firebase deploy.
Expected behavior
Two additive fixes, both cheap:
-
Pre-flight billing check in
deployprepare phase. Beforeprepare.tstriggers builds, callcloudbilling.checkBillingEnabled(projectId)once. If the plan is Spark and the plan targets features known to require Blaze (Cloud Functions of any generation, Extensions, Data Connect with Cloud SQL, App Hosting), fail fast with the same Blaze error. Skips minutes of wasted CPU/network on every doomed deploy. -
Tier badge in
firebase init. When the user picks a feature that requires Blaze, print an inline note (requires the Blaze billing plan) next to the choice — the same wordingnodeBillingErrorproduces at deploy time. Right now the tier requirement is invisible until first deploy fails.
Both changes reuse existing helpers (cloudbilling.checkBillingEnabled, nodeBillingError) — no new API surface, no new dependencies. Feature-to-tier mapping already implicit in the code; just needs to be surfaced.
Files: src/deploy/functions/prepare.ts, src/deploy/functions/ensure.ts, src/init/features/** (per-feature init prompts), src/gcp/cloudbilling.ts (helper, no change).
- Ngôn ngữ chính
- TypeScript
- Star
- 4.5k
- Fork
- 1.3k
- Merge trung bình
- 2 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 88
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-tools
-
api: functions reproducible type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
firebase/firebase-tools#11066 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
emulators: functions type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
firebase/firebase-tools#10398 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
emulator-suite emulators: functions help-wanted type: feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
firebase/firebase-tools#3728 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Next.js deploy: `Expected value for external to be a string, got object instead` since 15.31.0 (stream-chain 4 no longer flattens arrays)Có thể đã có người làm @leoortizz đã nhận 1 ngày trước. Đang mởintegration: web frameworks type: bug
firebase/firebase-tools#11185 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
emulators: storage type: bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
firebase/firebase-tools#11167 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của firebase/firebase-tools
Issue tương tự
-
bug via-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
pingdotgg/t3code#14452 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
solana-foundation/program-examples#747 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
remotion-dev/remotion#11847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openwatersio/slackwater#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
melgarafael/DeskcommCRM#1998 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày