Skip to content

firestore-bigquery-export kit: EXCLUDE_OLD_DATA and USE_NEW_SNAPSHOT_QUERY_SYNTAX read 'yes' as false #3126

Description

@cabljac

The extension declared EXCLUDE_OLD_DATA and USE_NEW_SNAPSHOT_QUERY_SYNTAX as yes/no selects (firestore-bigquery-export/extension.yaml) and read them with === "yes" (functions/src/config.ts:195-196). The kit declares both with defineBoolean (kits/firestore-bigquery-export/src/config.ts:400 and :407), and firebase-functions' BooleanParam resolves the env var by comparing it to the string true (lib/params/types.js).

So a .env carried over from the extension with EXCLUDE_OLD_DATA=yes silently reads as false: old_data is written where the extension omitted it. USE_NEW_SNAPSHOT_QUERY_SYNTAX=yes likewise reads as false, so the latest-snapshot view is created with the legacy syntax.

The README documents the rename ("change any yes to true in your .env"), so this is a known divergence, but it is silent at runtime and is not recorded on the parity tracker.

Options:

  1. Read both via defineString with validationRegex: /^(true|false|yes|no)$/ and map yes to true, so a migrated .env keeps working.
  2. Keep defineBoolean but add a validationRegex that rejects yes/no at deploy, so the mismatch fails loudly instead of flipping behaviour.
  3. Keep as is and record the decision on Kits parity issues #2974.

1 is the parity choice. Tracked in #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