Skip to content

refactor(kits): migrate all kits from the INSTANCE_ID param to the injected FIREBASE_KIT_INSTANCE_ID #3063

Description

@cabljac

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions