firebase-tools >= 15.27.0 injects FIREBASE_KIT_INSTANCE_ID for kit instances at discovery, deploy, emulator, and serve time (lib/functions/env.js loadFirebaseEnvs; provided to discovery envs in lib/deploy/functions/prepare.js). The params machinery never consults it and the FIREBASE_ prefix is reserved in .env, so the correct pattern is a direct process.env.FIREBASE_KIT_INSTANCE_ID read at discovery time - NOT a defineString param. PR #3060 implements this for kits/delete-user-data, including the clear missing-var error naming the CLI floor; use it as the template.
Remaining kits still declare defineString("INSTANCE_ID") as a user-supplied param (grep INSTANCE_ID under kits/*/src). Migrate each: read the injected var, derive instance-scoped defaults (topic names etc.) from it, drop the param, update tests, note the 15.27.0 minimum CLI version in each README. Also decide where the version floor is documented repo-wide (kits README?).
Resolves the #2974 "Look into" question about FIREBASE_KIT_INSTANCE_ID.
firebase-tools >= 15.27.0 injects
FIREBASE_KIT_INSTANCE_IDfor kit instances at discovery, deploy, emulator, and serve time (lib/functions/env.jsloadFirebaseEnvs; provided to discovery envs inlib/deploy/functions/prepare.js). The params machinery never consults it and theFIREBASE_prefix is reserved in.env, so the correct pattern is a directprocess.env.FIREBASE_KIT_INSTANCE_IDread at discovery time - NOT adefineStringparam. PR #3060 implements this forkits/delete-user-data, including the clear missing-var error naming the CLI floor; use it as the template.Remaining kits still declare
defineString("INSTANCE_ID")as a user-supplied param (grepINSTANCE_IDunder kits/*/src). Migrate each: read the injected var, derive instance-scoped defaults (topic names etc.) from it, drop the param, update tests, note the 15.27.0 minimum CLI version in each README. Also decide where the version floor is documented repo-wide (kits README?).Resolves the #2974 "Look into" question about
FIREBASE_KIT_INSTANCE_ID.