Skip to content

fix(delete-user-data): ENABLE_AUTO_DISCOVERY reads the extension's yes as false #3150

Description

@cabljac

Problem

The extension declares ENABLE_AUTO_DISCOVERY as a select with values yes / no (delete-user-data/extension.yaml), and its code reads process.env.ENABLE_AUTO_DISCOVERY === "yes" (delete-user-data/functions/src/config.ts:24).

The kit declares it with defineBoolean (kits/delete-user-data/src/config.ts:119). BooleanParam.value() is process.env.ENABLE_AUTO_DISCOVERY === "true", so a .env exported from the extension (ENABLE_AUTO_DISCOVERY=yes) reads as false and auto discovery is silently off after migration.

Same class of bug as #3126, which #3145 fixed for firestore-bigquery-export.

Fix

Match the extension: defineString with input: select({ Yes: "yes", No: "no" }), default no, and a yesNo mapping (value.trim().toLowerCase() === "yes") into config.enableAutoDiscovery. Only yes enables; true reads as off. Update the README config table and add a changelog line. Reference implementation: kits/firestore-bigquery-export/src/config.ts after #3145.

Audit note

All other defineBoolean params across the kits (WILDCARD_IDS, OAUTH_SECURE, IS_ANIMATED, MAKE_PUBLIC, REGENERATE_TOKEN, DO_BACKFILL, UPDATE_ON_CONFIGURE, ENABLE_AUTOMATIC_PUNCTUATION) sit on extension selects that already used true / false, so they are unaffected. The firestore-genai-chatbot pair is the only other case and has its own issue.

Parity ledger: #2974.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions