Repository navigation
Open
11 / 1511 of 15 issues completedDescription
Tracks parity between the delete-user-data extension (0.1.30) and the @firebase-function-kits/delete-user-data kit.
How it was tested: both deployed side by side on a test project with matching configs, then compared on data deleted, events, Pub/Sub messages, logs, runtime settings, install and uninstall. Kit tested at kits @ fcdd555, installed three ways: the README's manual setup, functions:kits:install, and ext:migrate.
Sub-issues are ordered by priority, highest first.
Issues labelled decision need a call: change the kit, or record the difference as accepted in the below "Decisions" section.
Decisions
- decision(delete-user-data): kit/extension parity – kit continues after an Eventarc publish failure, the extension aborts #3254: Eventarc publish failures are logged as warnings and deletion carries on, where the extension aborted. Accepted. Documented in docs(delete-user-data): note that a failed event publish doesn't stop deletion #3321.
- decision(delete-user-data): kit/extension parity – CLI-installed kit runs Node 24, extension runs Node 22 #3261: the runtime follows the host codebase, so
functions:kits:installandext:migratedeploy on Node 24 where the extension ran nodejs22. Accepted. - decision(delete-user-data): kit/extension parity – blank required params fail the kit deploy, the extension uses defaults #3256: blank required params fail the deploy instead of falling back to their defaults, as the
firestore-bigquery-exportkit does. Accepted. README update in docs(delete-user-data): mark which kit settings can be blank #3318. - decision(delete-user-data): kit/extension parity – event source is per function, not per instance #3255: events keep the per-function
source(projects/<p>/locations/<region>/services/kit-<id>-<function>) instead of the extension's per-instance one, so one instance has three sources. Accepted. Already documented in the kit README. - decision(delete-user-data): kit/extension parity – kit service account gets project-wide run.invoker #3253: the kit's service account gets
roles/run.invoker(androles/eventarc.eventReceiver) project-wide, as thefirestore-bigquery-exportkit does, because the CLI only grants project-level roles. Accepted until the CLI supports resource-scoped roles. - decision(delete-user-data): kit/extension parity – startup config log is lazy and uses different keys #3257: the startup config log is written on the first event, with the kit's resolved config keys, as the
firestore-bigquery-exportkit does. Accepted. - decision(delete-user-data): kit/extension parity – kit-only topic params break non-interactive ext:migrate #3260: the topic names are always
kit-<instance id>-discoveryandkit-<instance id>-deletion, with no settings to change them, as the extension derived its topics from its instance id. This letsext:migraterun unattended. Fixed in fix(delete-user-data): derive the Pub/Sub topic names from the instance id #3330.
Intentional Differences
- 2nd gen only: all three functions are 2nd gen, so
clearDatalistens on the 2nd gen Auth eventgoogle.firebase.auth.user.v2.deletedinstead of the 1st genuser.deletetrigger. - Instance id and topics: the instance id comes from
firebase.json(FIREBASE_KIT_INSTANCE_ID), and the Pub/Sub topics arekit-<id>-discovery/kit-<id>-deletioninstead ofext-<id>-*. - Region: there's no install-time location. Set it with
setGlobalOptions({ region }); thefunctions:kits:installandext:migratetemplates do this fromFUNCTION_DEFAULT_REGION. Otherwise the functions deploy tous-east1. - Ingress: all three functions are always
ALLOW_INTERNAL_ONLY, the extension's default. The extension's install-time ingress setting doesn't carry over:setGlobalOptions({ ingressSettings }), whichext:migrateuses for it, doesn't change the kit's ingress (fix(delete-user-data): kit/extension parity – kit silently skips deletions under load (concurrency 80 OOM) #3250). - Eventarc channel: the kit doesn't create the channel. It must exist before
EVENTARC_CHANNELis set. - Failure status: 2nd gen request logs show HTTP 200 for failed and timed-out runs, and there's no
status: 'error'/'timeout'line. Failures only show up in the logs. - When param values are checked: the extension checked each value once, when it was installed or reconfigured. The kit has no install step, so it checks the same values every time it's deployed or loaded in the emulator, and a bad value fails that deploy. It accepts and rejects the same values as the extension, option labels included (once fix(delete-user-data): reject invalid select and regex param values at deploy #3278 lands).
- Eventarc publish failures: logged as warnings, and deletion carries on. The extension aborted, skipping auto-discovery and
SEARCH_FUNCTION(decision(delete-user-data): kit/extension parity – kit continues after an Eventarc publish failure, the extension aborts #3254). - Node runtime: follows the host codebase.
functions:kits:installandext:migratewrite Node 24; the extension ran nodejs22 (decision(delete-user-data): kit/extension parity – CLI-installed kit runs Node 24, extension runs Node 22 #3261).
Activity
fix(delete-user-data): reject invalid select and regex param values a…
fix(delete-user-data): default the functions to us-central1 via FUNCT…
fix(delete-user-data): default maxInstances to 3000, the extension's …
fix(delete-user-data): recommend .env.<projectId> and document kit un…
docs(delete-user-data): note that a failed event publish doesn't stop…
fix(delete-user-data): derive the Pub/Sub topic names from the instan…