Skip to content

Kits parity issues #2974

Description

@CorieW

Below are comments for each extension to kit migration. Each comment displays the differences between the extension and the corresponding kit.

Notes

  • Some changes are due to migrations from gen1 functions to gen2. These specific changes have been excluded from the comments below.
  • yes / no params changed to booleans (with defineBoolean) in kits.
  • Service account params have been removed in kits, as they conflict with declarative security (requiresRole) stuff.
  • LOCATION params have been removed in kits, as kits builds this feature in.
  • Some changes may be due to dependency upgrades, or more recent Node versions.
  • Extensions previously didn't support a number type, so they used text/string type with regex (e.g. validation: ^[0-9]) for validation. Kits now use defineInt, so they don't require the regex validation.
  • Roles and APIs could take reasons in extensions. With kits, only APIs can take a reason.
  • required: defaults to true when omitted in extension.yaml, and several extensions omit it on params their own code and descriptions treat as optional (BACKUP_COLLECTION, DEFAULT_REPLY_TO, USERS_COLLECTION, TEMPLATES_COLLECTION). Kits match the code behaviour (optional, empty → undefined), not the yaml.
  • defineSecret cannot be optional — SecretParamOptions only takes label/description, so any bound secret must exist at deploy. Extension params declared type: secret, required: false (API_KEY, GOOGLE_AI_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, and the send-email SMTP/OAuth secrets) therefore become mandatory-at-deploy in kits. Platform constraint, not a kit choice.
  • Where an extension's yaml default disagreed with its own code fallback (firestore-genai-chatbot / firestore-vector-search COLLECTION_NAME, delete-user-data AUTO_DISCOVERY_SEARCH_FIELDS), kits standardise on the yaml default.
  • No firebase-functions/params equivalent of the ${DATABASE_INSTANCE} system param. In the extension, the built-in FIREBASE_CONFIG.databaseURL resolves without prompting. This is something kit has to handle itself. Only applicable in rtdb-limit-child-nodes extension/kit.
  • fix(kits): restore param prompt UX (labels, descriptions, examples, selects) #2984 restored the extensions' param label / description / example values (verbatim, minus six upstream typos fixed in review), select option labels via the select() Record overload, and nonEmpty on required-no-default strings. Remaining prompt-UX gaps: IMG_BUCKET / EXTENSION_BUCKET (picker input carries no regex or example).
  • fix(kits): restore extension param validation regexes #2979 restored the extensions' validationRegex / validationErrorMessage on kit params (via the params TextInput), verbatim — including upstream bugs. Optional params gain an empty branch, translating required: false. Only IMG_BUCKET / EXTENSION_BUCKET remain regex-less: their BUCKET_PICKER input cannot also carry a regex.
  • extension.yaml used to have a reason for roles and APIs. Now with kits, only requiresAPI accepts a reason param. requiresRole doesn't accept a reason.

Look into

  • Potentially could use FIREBASE_KIT_INSTANCE_ID?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions