Skip to content

Commit 319553b

Browse files
committed
docs: add comprehensive documentation about system params in extension adapter
- Documented how system params work (auto-generated, advanced, not env vars) - Listed common system params (location, memory, timeout, etc.) - Explained differences between v1 and v2 functions (memory units) - Noted that full system param support would require detecting function types and user configuration - For local testing, we rely on properties defaults or platform defaults
1 parent 07bcfda commit 319553b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/deploy/functions/extensionAdapter.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,18 @@ export async function detectAndAdaptExtension(
477477

478478
// TODO: Handle IAM roles - extensions can require specific IAM roles for their service account
479479
// TODO: Support lifecycle events (onInstall, onUpdate, onConfigure) - these are task queue functions
480+
481+
// System params note: Extensions automatically get system params like:
482+
// - firebaseextensions.v1beta.function/location (defaults to us-central1)
483+
// - firebaseextensions.v1beta.function/memory (defaults to 256MB for v1, 256Mi for v2)
484+
// - firebaseextensions.v1beta.function/timeoutSeconds (configurable 0-540)
485+
// These are marked as "advanced" params and configure resources directly (not env vars).
486+
// For local testing, we rely on defaults in resource properties or let the Functions
487+
// platform use its defaults. Full system param injection would require:
488+
// 1. Detecting which function types are used (v1 vs v2)
489+
// 2. Generating appropriate system param definitions
490+
// 3. Accepting user values (from env vars or config for testing)
491+
// 4. Applying them to endpoints where not already specified in properties
480492

481493
const functionsBuild = build.empty();
482494

0 commit comments

Comments
 (0)