Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

deploy: pre-flight Blaze-tier check + surface tier requirement in firebase init (avoid wasted deploys)

オープン
#10,751 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
cli, cloud

調査の方向性

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 の本文から書いたものです。

説明

api: core polish
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
  1. On a project on the free Spark plan, run firebase init functions (or add Cloud Functions, Extensions, or a Data Connect service).
  2. Write code. Run firebase deploy.
  3. Deploy proceeds through TS/JS build, packaging, artifact upload, and only then — after minutes of work — fails at cloudBuildEnabled (see src/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:

  1. Pre-flight billing check in deploy prepare phase. Before prepare.ts triggers builds, call cloudbilling.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.

  2. 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 wording nodeBillingError produces 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

firebase/firebase-tools のほかの issue

firebase/firebase-tools の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。