deploy: pre-flight Blaze-tier check + surface tier requirement in firebase init (avoid wasted deploys)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- typescript
調査の方向性
src/deploy/functions/prepare.ts から始めて、デプロイの準備がどのようにビルドをトリガーするかを追跡し、次に src/deploy/functions/ensure.ts と nodeBillingError を調べて既存の Blaze 失敗を確認します。billing フローを src/extensions/checkProjectBilling.ts および src/dataconnect/provisionCloudSql.ts と比較し、その後 src/init/features/** で feature プロンプトを確認します。完了条件は、対象となるデプロイがビルド処理の前に失敗し、Blaze を必要とする init の選択肢に指定された注記が表示されることです。
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- TypeScript
- スター
- 4.5k
- フォーク
- 1.3k
- 平均マージ
- 2日 8時間
- マージ済み PR(30日)
- 84
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-tools のほかの issue
-
api: functions reproducible type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
firebase/firebase-tools#11066 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
emulators: functions type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
firebase/firebase-tools#10398 ·
メンテナーはふだん 1 日以内に返信
-
emulator-suite emulators: functions help-wanted type: feature request
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
firebase/firebase-tools#3728 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
emulators: storage type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
firebase/firebase-tools#11167 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
emulators: firestore Needs: Author Feedback type: bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/firebase-tools#11165 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
firebase/firebase-tools の issue をすべて見る
似ている issue
-
priority: P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
prime-radiant-inc/evener#3291 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug revealjs
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#14961 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
supabase/agent-skills#614 ·
-
Content
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
RunestoneInteractive/rs#1559 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信