@firebase-function-kits/firestore-bigquery-export 0.0.2-rc.12 → 0.0.2-rc.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ - fix: cap `syncBigQuery` at `maxInstances: 500`, its declared `maxConcurrentDispatches`. At concurrency `1`, the default 100 instances would take only 100 of the 500 dispatches Cloud Tasks may have in flight, so the cap keeps capacity level with the dispatch limit. A dispatch above the instance ceiling waits up to about 10 seconds for a free instance, then gets a Cloud Run 429 that Cloud Tasks counts as a failed attempt and retries on the queue's schedule (5 attempts, 60s minimum backoff), slowing the queue while 429s continue. The handler never ran for such a dispatch, so a task that exhausts its attempts that way writes no `BACKUP_COLLECTION` row. At 0.1666 vCPU the cap needs about 84 vCPU of regional Cloud Run CPU quota, within the captured defaults (500 in most regions, 343 in `europe-west10` and `europe-west12`); the README describes the deploy failure a smaller quota produces and how to recover.
2
+ - fix: set `timeoutSeconds: 540` on `syncBigQuery`, `initBigQuerySync` and `setupBigQuerySync`, the extension's 1st gen task-function timeout, instead of the 2nd gen default of 60s. `fsexportbigquery` keeps 60s, which the deployed trigger ran at.
3
+ - fix: set every function's `cpu` to `"gcf_gen1"` (0.1666 vCPU), the extension's allocation, instead of the 1 vCPU that the 2nd gen default resolves to at 256MiB.
4
+ - fix: set every function's concurrency to `1`, and `fsexportbigquery` ingress to `ALLOW_INTERNAL_ONLY`, matching the extension. Previously, the kit inherited the 2nd gen defaults of concurrency `80` and ingress `ALLOW_ALL`. The task-queue functions `syncBigQuery`, `initBigQuerySync` and `setupBigQuerySync` declare no `ingressSettings`, so they inherit the default `ALLOW_ALL`, or whatever `setGlobalOptions({ ingressSettings })` sets; the deployed extension's task-queue functions ran with open ingress, and the `initBigQuerySync` HTTP POST needs it. At concurrency `1` a function serves as many requests at once as it has instances: the Cloud Run default of 100, unless your codebase sets `setGlobalOptions({ maxInstances })`.
5
+ - fix: an Eventarc publish failure no longer fails the function. A channel that was deleted or is unreachable answers `PERMISSION_DENIED`, and the publish was awaited before the work the function exists to do, so the document change was never exported. The publish failure is now logged as a warning and the invocation continues. Deploys also declare `eventarcpublishing.googleapis.com`, so the API is enabled on your project whether or not you use events.
6
+
7
+ - docs: the no-region fallback needs an explicit empty `DATABASE_REGION=` line in `.env`. Omitting the key entirely fails a non-interactive deploy, because the CLI resolves parameters before it reads their defaults. Corrects the note on the `DATABASE_REGION` placement fix below; no behavior change.
1
8
  - fix: `USE_NEW_SNAPSHOT_QUERY_SYNTAX` and `EXCLUDE_OLD_DATA` take the extension's `yes` / `no` values again, so a config exported from the extension works unchanged. `WILDCARD_IDS` is unchanged: the extension already used `true` / `false` there.
2
9
  - feat: reinstate the extension's Cloud Tasks write buffer. A failed inline BigQuery write now enqueues onto a new `syncBigQuery` task queue (5 attempts, 60s minimum backoff, throttled by the restored `MAX_DISPATCHES_PER_SECOND` param, default 100) instead of replaying the Firestore event through Eventarc redelivery for up to 24 hours; `MAX_ENQUEUE_ATTEMPTS` (default 3) is also back. The `onSuccess` event returns with the queue handler. Two behavior changes against earlier release candidates: a row that exhausts the queue is dropped unless `BACKUP_COLLECTION` is set (extension parity - the tracker backs the row up on every terminal insert failure, so configure a backup collection), and deleting or moving the functions can leave the Cloud Tasks queue behind. A failed enqueue is logged at error level, published as an `onError` event, and dropped, as in the extension; the trigger no longer declares `retry: true`, so nothing is redelivered through Eventarc. Export the new `syncBigQuery` function from your codebase entry, and deploy with Firebase CLI 15.28.0+ so the trigger can address its own queue (`FIREBASE_KIT_INSTANCE_ID`); requires firebase-admin 14.2.0+.
3
10
  - fix: restore explicit function placement from `DATABASE_REGION`, now with the Firestore-location-to-Cloud-Run-region mapping. The `DATABASE_REGION` parameter is back and all three functions deploy to the region derived from it: regional locations pass through unchanged, and the multi-region locations map to a Cloud Run region (`nam5`/`nam7` to `us-central1`, `eur3` to `europe-west1`) instead of failing the deploy. With the parameter unset the functions still declare no region and the CLI falls back as before (`us-central1` by default, `FIREBASE_FUNCTIONS_DEFAULT_REGION` to override). Placement requires firebase-tools >= 15.28.0 (older CLIs do not load `.env` at discovery and keep the fallback). If your `.env` already carries `DATABASE_REGION` from an extension migration, upgrading to this version moves the functions to the mapped region on your next deploy, which deletes and recreates them.
package/README.md CHANGED
@@ -30,7 +30,7 @@ conflicts with that automatic setup.
30
30
  | `roles/bigquery.user` | run BigQuery jobs and materialized views |
31
31
  | `roles/datastore.user` | write failed-row records back to Firestore (only if you configure a backup collection) |
32
32
  | `roles/eventarc.eventReceiver` | receive Gen2 Firestore trigger events |
33
- | `roles/run.invoker` | allow Eventarc to invoke the Gen2 Cloud Run service |
33
+ | `roles/run.invoker` | allow Eventarc to invoke the Gen2 Cloud Run service, and Cloud Tasks to dispatch to the three task-queue functions, which have no function-level invoker binding |
34
34
  | `roles/eventarc.publisher` | publish the kit's custom Eventarc events (the Extensions platform granted this implicitly) |
35
35
  | `roles/cloudtasks.enqueuer` | enqueue failed writes onto the kit's own `syncBigQuery` task queue |
36
36
  | `bigquery.googleapis.com` | mirror Firestore collection changes in BigQuery |
@@ -204,6 +204,13 @@ Deploy wiring (declared in the package):
204
204
  - First deploy runs `initBigQuerySync` automatically (`afterFirstDeploy`).
205
205
  - Later deploys run `setupBigQuerySync` automatically (`afterRedeploy`).
206
206
 
207
+ The `afterRedeploy` hook only runs when the deploy actually updates the
208
+ functions. If nothing changed since the last deploy, the CLI skips the codebase
209
+ (`No resources modified for codebase: <id>. Skipping afterRedeploy lifecycle
210
+ hook.`) and `setupBigQuerySync` does not run. To force it, either change any
211
+ value in the instance's `.env` file and redeploy, or enqueue the task manually
212
+ as shown below, substituting `setupBigQuerySync` into the snippet.
213
+
207
214
  `initBigQuerySync` and `setupBigQuerySync` call the same handler; they exist as
208
215
  separate task functions so first-deploy and redeploy can target different
209
216
  queues, matching the extension's install vs update/configure split.
@@ -252,7 +259,9 @@ missing when a write arrives, the inline write fails and the change buffers
252
259
  through the `syncBigQuery` queue, which re-attempts the write on Cloud Tasks'
253
260
  schedule. The queue handler does not provision, as in the extension: if the
254
261
  resources are still missing the retries fail and the row lands in
255
- `BACKUP_COLLECTION`; run the lifecycle task (redeploy) to recreate them.
262
+ `BACKUP_COLLECTION`; run the lifecycle task to recreate them, either by
263
+ enqueueing `setupBigQuerySync` manually (see above) or by redeploying with a
264
+ config change so the deploy is not skipped.
256
265
 
257
266
  ## Failure handling
258
267
 
@@ -272,7 +281,10 @@ The write path mirrors the extension's Cloud Tasks buffer:
272
281
  4. On every terminal insert failure the tracker writes the row to
273
282
  `BACKUP_COLLECTION` (when configured), keyed by the event id, before the
274
283
  task fails. After the fifth attempt the task is dropped. **Without a backup collection, the row is dropped with the task** -
275
- configure `BACKUP_COLLECTION`.
284
+ configure `BACKUP_COLLECTION`. A task refused with a Cloud Run 429 at the
285
+ instance ceiling on every attempt never ran the handler, so it is dropped
286
+ with no backup row either way (see
287
+ [Concurrency, CPU and timeouts](#concurrency-cpu-and-timeouts-match-the-extension)).
276
288
  5. If the enqueue itself fails (BigQuery AND Cloud Tasks both failing), the
277
289
  trigger logs at error level, publishes an `onError` event, and the
278
290
  execution succeeds: the event is dropped, exactly as the extension did in
@@ -351,6 +363,92 @@ them.
351
363
  documents get there first; `EXCLUDE_OLD_DATA=yes` halves the payload. Same as
352
364
  the extension.
353
365
 
366
+ ## Migrating from the extension
367
+
368
+ ### Avoiding the cutover gap
369
+
370
+ `firebase ext:migrate` deploys the kit and then uninstalls the extension. The
371
+ extension's trigger stops delivering as it is uninstalled, while the kit's
372
+ trigger is newly created and takes a few minutes to deliver reliably, so writes
373
+ made in between can reach neither exporter. Those writes are never seen by a
374
+ function, so they appear in neither the changelog nor `BACKUP_COLLECTION`, and
375
+ the command reports no error.
376
+
377
+ To migrate without that gap, keep both exporters running until the kit is
378
+ confirmed to be working.
379
+
380
+ Run `ext:migrate` without `--force` and answer no when it asks whether to
381
+ uninstall the extension. That question comes last, after the kit has deployed.
382
+ The prompts before it cover the migration and the kit installation, so
383
+ declining one of those aborts the migration instead.
384
+
385
+ Both exporters are now live, each logging under its own function name:
386
+ `ext-<instance-id>-fsexportbigquery` for the extension and
387
+ `kit-<instance-id>-fsexportbigquery` for the kit. Follow the kit's:
388
+
389
+ ```shell
390
+ firebase functions:log --only kit-<instance-id>-fsexportbigquery --project <project-id>
391
+ ```
392
+
393
+ At the default `LOG_LEVEL` of `info`, each delivered write logs `Firestore
394
+ event received by onDocumentWritten trigger` with the document name; `warn` and
395
+ above suppress that line. Write to the collection and confirm the kit records
396
+ every write rather than an intermittent few. A newly created trigger commonly
397
+ needs several minutes to reach that point. Then uninstall the extension:
398
+
399
+ ```shell
400
+ firebase ext:uninstall <instance-id> --project <project-id> --immediate
401
+ ```
402
+
403
+ Running both exporters together is safe. Both triggers receive the same event
404
+ id, and the changelog row carries it as its BigQuery insert id, so BigQuery
405
+ collapses the second copy. Deduplication is best effort, but a duplicate row
406
+ would not change the latest view, which reports one row per document.
407
+
408
+ ### Recovering documents missed during the gap
409
+
410
+ If the cutover gap has already occurred, re-import the collection with
411
+ `fs-bq-import-collection` from the extension repository, pointed at the dataset
412
+ and table prefix the kit writes to. In non-interactive mode the script requires
413
+ the project, collection path, dataset, table prefix,
414
+ `--query-collection-group` and `--dataset-location`:
415
+
416
+ ```shell
417
+ npx @firebaseextensions/fs-bq-import-collection \
418
+ --non-interactive \
419
+ --project <project-id> \
420
+ --source-collection-path <COLLECTION_PATH> \
421
+ --dataset <DATASET_ID> \
422
+ --table-name-prefix <TABLE_ID> \
423
+ --query-collection-group false \
424
+ --dataset-location <DATASET_LOCATION> \
425
+ --firestore-instance-id <DATABASE>
426
+ ```
427
+
428
+ Import only once the kit is exporting, and pause writes to the collection while
429
+ it runs: the script reads each document and writes its row shortly afterwards,
430
+ so a write streamed mid-import can be superseded by the import row until that
431
+ document changes again.
432
+
433
+ Before importing, note what it does and does not restore:
434
+
435
+ - The script imports the entire collection; it cannot target a subset. Every
436
+ document receives one `IMPORT` row holding its current value. Import rows
437
+ carry no event id, so running the import again adds a further row per
438
+ document rather than replacing the earlier one.
439
+ - Rows are stamped with the time the import runs, so afterwards every document
440
+ reports operation `IMPORT` in the latest view. Current values remain correct
441
+ and the preceding rows remain in the changelog, but the latest view no longer
442
+ reflects the last real operation. (The extension's import guide describes
443
+ these rows as carrying an epoch timestamp; version 0.1.27 uses the import
444
+ time.)
445
+ - Deletes cannot be recovered, because the import reflects only what Firestore
446
+ holds when it runs. A document deleted during the gap is no longer there to
447
+ import, so the delete never reaches the changelog and the document stays
448
+ visible in the latest view with its last exported value. An update that a
449
+ later write superseded is likewise unavailable, since only the current value
450
+ is imported.
451
+
354
452
  ## Differences from the Stream Firestore to BigQuery extension
355
453
 
356
454
  This kit is the extension repackaged as an npm package, but a few things behave
@@ -375,12 +473,6 @@ inside that window. That property is gone by design - a row that exhausts the
375
473
  queue without a configured `BACKUP_COLLECTION` is dropped, exactly as in the
376
474
  extension. Set `BACKUP_COLLECTION`.
377
475
 
378
- ### Wildcard columns include the document ID
379
-
380
- With `WILDCARD_IDS=true`, the wildcard column now contains a `documentId` key
381
- alongside the path parameters from your collection path. The extension wrote
382
- the path parameters only.
383
-
384
476
  ### DATABASE_REGION places the functions
385
477
 
386
478
  The extension's `LOCATION` parameter is gone. Instead, the kit deploys its
@@ -397,23 +489,38 @@ it is honored: the functions deploy near your database.
397
489
 
398
490
  Placement needs firebase-tools 15.28.0 or later - older CLIs do not load
399
491
  `.env` values during deploy discovery, so the functions silently fall back to
400
- the no-region behavior below. Two consequences worth knowing before you
401
- deploy. Upgrading the CLI (or this kit, if your `.env` already carried
492
+ the no-region behavior below. Upgrading the CLI (or this kit, if your `.env` already carried
402
493
  `DATABASE_REGION`) can itself trigger the region move described below on your
403
- next deploy. And on a fresh interactive install the value you enter at the
404
- prompt only takes effect from the second deploy: the first deploy computes
405
- regions before the prompt runs, so it lands in `us-central1` and the next
406
- deploy moves the functions.
407
-
408
- With `DATABASE_REGION` unset or empty, the functions declare no region and the
409
- Firebase CLI resolves one at deploy time: a function keeps the region it is
410
- already deployed in, and on a first deploy lands in `us-central1` unless you
411
- set the `FIREBASE_FUNCTIONS_DEFAULT_REGION` environment variable when running
412
- `firebase deploy`. Careful with that variable: it applies to every no-region
413
- function in the deploy, not just this kit. Note that changing an existing
414
- install's function region (via this variable or `DATABASE_REGION`) deletes and
415
- recreates the functions in the new region - new URLs, a recreated task queue,
416
- and any in-flight tasks are lost.
494
+ next deploy.
495
+
496
+ `firebase functions:kits:install` and `firebase ext:migrate` prompt for this
497
+ value and write it to `.env` before anything is deployed, so a single deploy
498
+ places the functions correctly. If you instead run `firebase deploy` with the
499
+ value still missing from `.env`, the prompt comes after discovery has already
500
+ chosen a region, so your answer only takes effect on the following deploy.
501
+
502
+ `firebase ext:migrate` also writes `FUNCTION_DEFAULT_REGION` to your `.env`,
503
+ recording where the extension's functions ran. Nothing reads it: placement
504
+ comes from `DATABASE_REGION` alone, so if the two disagree your next deploy
505
+ moves the functions.
506
+
507
+ With an explicit empty `DATABASE_REGION=` line in `.env`, the functions declare
508
+ no region and the Firebase CLI resolves one at deploy time: a function keeps
509
+ the region it is already deployed in, and on a first deploy all four land in
510
+ `us-central1`. The CLI would otherwise place `fsexportbigquery` next to the
511
+ database, but it resolves the default region before it resolves params, so the
512
+ `DATABASE` param this kit passes to the trigger is still an unresolved
513
+ expression when the database is looked up, and the lookup falls back
514
+ ([firebase/firebase-tools#11020](https://github.com/firebase/firebase-tools/issues/11020)).
515
+ Setting the `FIREBASE_FUNCTIONS_DEFAULT_REGION` environment variable when
516
+ running `firebase deploy` puts all of them in that region instead. Careful
517
+ with that variable: it applies to every no-region function in the deploy, not
518
+ just this kit. Omitting the line is not the same as an empty one: a
519
+ non-interactive deploy fails with `In non-interactive mode but have no value
520
+ for the following environment variables: DATABASE_REGION`. Note that changing
521
+ an existing install's function region (via this variable or `DATABASE_REGION`)
522
+ deletes and recreates the functions in the new region - new URLs, a recreated
523
+ task queue, and any in-flight tasks are lost.
417
524
 
418
525
  ### Defaults
419
526
 
@@ -453,7 +560,68 @@ The extension shipped companion scripts that this package does not:
453
560
 
454
561
  `IMPORT_COLLECTION_PATH` is not a setting here. If you rely on any of these,
455
562
  keep using the versions from the extension repository. They operate on the same
456
- BigQuery changelog table, so they still work against data this kit writes.
563
+ BigQuery changelog table, so they still work against data this kit writes. See
564
+ "Migrating from the extension" for using `fs-bq-import-collection` to recover
565
+ documents missed during a migration.
566
+
567
+ ### Concurrency, CPU and timeouts match the extension
568
+
569
+ Every function sets `concurrency: 1` and `cpu: "gcf_gen1"`, and
570
+ `fsexportbigquery` also sets `ingressSettings: "ALLOW_INTERNAL_ONLY"`. The 2nd
571
+ gen defaults would be concurrency `80`, `ALLOW_ALL`, and 1 vCPU at 256MiB. The
572
+ extension deployed every function at 0.1666 vCPU with an instance handling one
573
+ invocation at a time, and only internal traffic reached the Firestore trigger.
574
+ The task-queue functions `syncBigQuery`, `initBigQuerySync` and
575
+ `setupBigQuerySync` set `timeoutSeconds: 540`, the extension's 1st gen task
576
+ timeout; `fsexportbigquery` keeps the 60 second default, which the deployed
577
+ trigger ran at.
578
+
579
+ The task-queue functions declare no `ingressSettings`, so they inherit the
580
+ default `ALLOW_ALL`, or whatever your codebase sets with
581
+ `setGlobalOptions({ ingressSettings })`. The deployed extension's task-queue
582
+ functions ran with open ingress, and the `curl` into `initBigQuerySync` under
583
+ [Provisioning](#provisioning) relies on it: setting `ALLOW_INTERNAL_ONLY`
584
+ globally makes that request fail.
585
+
586
+ At concurrency `1`, a function serves as many requests at once as it has
587
+ instances. `fsexportbigquery`, `initBigQuerySync` and `setupBigQuerySync` run
588
+ on the Cloud Run default of 100 instances unless your codebase sets
589
+ `setGlobalOptions({ maxInstances })`; the two lifecycle tasks receive one task
590
+ per deploy, so no cap is declared on them. The trigger therefore handles 100
591
+ events at once, the same as the deployed extension trigger (100 instances,
592
+ concurrency `1`, no retry policy). An event above that ceiling waits up to
593
+ about 10 seconds for a free instance and is then refused before the handler
594
+ runs: no error log, no `onError` event, no enqueue and no backup row. Whether
595
+ Eventarc redelivers a refused push under the trigger's
596
+ `RETRY_POLICY_DO_NOT_RETRY` is not verified. Raise
597
+ `setGlobalOptions({ maxInstances })` to lift the ceiling.
598
+
599
+ `syncBigQuery` sets `maxInstances: 500` to match its `maxConcurrentDispatches`
600
+ limit, and a global `maxInstances` does not override it: Cloud Tasks may
601
+ dispatch 500 tasks at once, and 100 instances would take only 100 of them. A
602
+ dispatch above the instance ceiling waits for a free instance for up to about
603
+ 10 seconds, then gets a Cloud Run 429. Cloud Tasks counts that as a failed
604
+ attempt, retries it on the queue's schedule (5 attempts, 60 seconds minimum
605
+ backoff), and slows the queue while 429s continue. The handler never ran for
606
+ such a dispatch, so a task that exhausts its attempts that way writes no
607
+ `BACKUP_COLLECTION` row.
608
+
609
+ At 0.1666 vCPU, `maxInstances: 500` needs about 84 vCPU of Cloud Run CPU quota
610
+ in the function's region (Cloud Run caps a service's instances at the regional
611
+ CPU quota divided by the CPU per instance). Default quotas captured at the time
612
+ of writing were 500 vCPU in most regions and 343 in `europe-west10` and
613
+ `europe-west12`, so the default suffices everywhere captured. On a project
614
+ whose quota is lower, `firebase deploy` creates the other functions, exits with
615
+ an error on `syncBigQuery`, and skips the `afterFirstDeploy` lifecycle hook;
616
+ after raising the quota, run
617
+ `firebase functions:lifecycle:run afterFirstDeploy <codebase>` or redeploy. To
618
+ lower the cap instead, change `SYNC_MAX_CONCURRENT_DISPATCHES` in
619
+ `src/index.ts`, which sets both `maxInstances` and `maxConcurrentDispatches`,
620
+ and deploy from your modified copy: the kit exposes no parameter for it, and
621
+ lowering only `maxInstances` recreates the 429 loss above. The separate Cloud
622
+ Run Instances quota (100 per project per region in some regions, unlimited in
623
+ `us-central1` and `europe-west1`) also caps the instances running across all
624
+ services in the region.
457
625
 
458
626
  ## API surface
459
627
 
package/lib/config.d.ts CHANGED
@@ -30,5 +30,14 @@ export declare function buildPartitioningConfig(params: {
30
30
  * @returns The export configuration assembled from environment params.
31
31
  */
32
32
  export declare function configFromEnv(): ExportConfig;
33
+ /**
34
+ * Rejects required params that were explicitly set to an empty value.
35
+ *
36
+ * `.env` values bypass the CLI's prompt-time validation and take precedence
37
+ * over a param's declared default, so an empty entry otherwise reaches the
38
+ * handlers silently. Called at module scope so deploy-time discovery fails
39
+ * before the function ships, rather than on the first event.
40
+ */
41
+ export declare function assertRequiredParams(names?: ReadonlyArray<string>): void;
33
42
  export {};
34
43
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,mBAAmB,EAEnB,2BAA2B,EAC5B,MAAM,uDAAuD,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAQtE,OAAO,KAAK,EAAE,YAAY,EAAY,MAAM,iBAAiB,CAAC;AAG9D,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAmE3E,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACzC,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAClC,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACnC,sGAAsG;IACtG,sBAAsB,EAAE,QAAQ,CAAC;CAClC;AAyXD,eAAO,MAAM,kBAAkB,EAAE,iBAMhC,CAAC;AAiBF,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,YAEtD;AA4BD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,gBAAgB,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACrD,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;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,cAAc,CAAC,CAuEtC;AAgDD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,IAAI,YAAY,CAkC5C;AAqBD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,GAAE,aAAa,CAAC,MAAM,CAAmB,GAC7C,IAAI,CAYN"}
package/lib/config.js CHANGED
@@ -19,6 +19,7 @@ exports.CONFIG_EXPRESSIONS = void 0;
19
19
  exports.clustering = clustering;
20
20
  exports.buildPartitioningConfig = buildPartitioningConfig;
21
21
  exports.configFromEnv = configFromEnv;
22
+ exports.assertRequiredParams = assertRequiredParams;
22
23
  const firestore_bigquery_change_tracker_1 = require("@firebaseextensions/firestore-bigquery-change-tracker");
23
24
  const params_1 = require("firebase-functions/params");
24
25
  const DECIMAL_RADIX = 10;
@@ -98,16 +99,20 @@ const params = {
98
99
  label: "BigQuery Project ID",
99
100
  description: "Override the default project for BigQuery instance. This can allow updates to be directed to to a BigQuery instance on another GCP project.",
100
101
  default: params_1.projectID,
102
+ // `required: true` in the extension, which refuses an empty answer.
103
+ input: { text: { nonEmpty: true } },
101
104
  }),
102
105
  database: (0, params_1.defineString)("DATABASE", {
103
106
  label: "Firestore Instance ID",
104
107
  description: 'The Firestore database to use. Use "(default)" for the default database. You can view your available Firestore databases at https://console.cloud.google.com/firestore/databases.',
105
108
  default: "(default)",
106
- input: { text: { example: "(default)" } },
109
+ // `required: true` in the extension, which refuses an empty answer.
110
+ input: { text: { example: "(default)", nonEmpty: true } },
107
111
  }),
108
112
  // Declared so the CLI prompts for the value and persists it to `.env`; the
109
- // function region option cannot be a param expression, so the entry point
110
- // reads the same variable from `process.env` at module load instead.
113
+ // location to Cloud Run region lookup needs a nested ternary the CLI's CEL
114
+ // subset cannot express, so the entry point reads the same variable from
115
+ // `process.env` at module load instead.
111
116
  databaseRegion: (0, params_1.defineString)("DATABASE_REGION", {
112
117
  label: "Firestore Instance Location",
113
118
  description: "Where is the Firestore database located? You can check your current database location at https://console.cloud.google.com/firestore/databases. The functions in this kit deploy to the Cloud Run region closest to this location.",
@@ -567,4 +572,40 @@ function configFromEnv() {
567
572
  maxEnqueueAttempts: optionalInt(params.maxEnqueueAttempts),
568
573
  };
569
574
  }
575
+ // Params the published extension marks `required: true`. A value the user never
576
+ // supplied is absent from process.env; one they deliberately blanked is present
577
+ // and empty. Only the second is a misconfiguration, so the guard below reads
578
+ // process.env rather than `.value()`, which reports both as "".
579
+ // DATABASE_REGION is `required: true` upstream but deliberately omitted here:
580
+ // an explicit empty value is a supported setting that leaves the function
581
+ // without a declared region, so the CLI resolves one at deploy time.
582
+ const REQUIRED_PARAMS = [
583
+ "DATASET_LOCATION",
584
+ "BIGQUERY_PROJECT_ID",
585
+ "DATABASE",
586
+ "COLLECTION_PATH",
587
+ "DATASET_ID",
588
+ "TABLE_ID",
589
+ "VIEW_TYPE",
590
+ "USE_NEW_SNAPSHOT_QUERY_SYNTAX",
591
+ "LOG_LEVEL",
592
+ ];
593
+ /**
594
+ * Rejects required params that were explicitly set to an empty value.
595
+ *
596
+ * `.env` values bypass the CLI's prompt-time validation and take precedence
597
+ * over a param's declared default, so an empty entry otherwise reaches the
598
+ * handlers silently. Called at module scope so deploy-time discovery fails
599
+ * before the function ships, rather than on the first event.
600
+ */
601
+ function assertRequiredParams(names = REQUIRED_PARAMS) {
602
+ const blank = names.filter((name) => {
603
+ const raw = process.env[name];
604
+ return raw !== undefined && raw.trim() === "";
605
+ });
606
+ if (blank.length > 0) {
607
+ throw new Error(`Required parameters are set to an empty value: ${blank.join(", ")}. ` +
608
+ "Set them in your .env file, or remove the entries to use their defaults.");
609
+ }
610
+ }
570
611
  //# sourceMappingURL=config.js.map
package/lib/config.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AA6eH,gCAEC;AA4BD,0DA4EC;AA2DD,sCAkCC;AA7qBD,6GAAiF;AAEjF,sDAMmC;A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AAiB,CAAC,KAAK,EAAE,CAAC;QAC7D,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QAC/C,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACpD,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAAC,sBAAsB,CAAC;QAClE,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,kBAAkB,CAAC;KAC3D,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAifH,gCAEC;AA4BD,0DA4EC;AA2DD,sCAkCC;AA6BD,oDAcC;AA5tBD,6GAAiF;AAEjF,sDAMmC;AAKnC,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,wBAAwB,GAAG;IAC/B,aAAa;IACb,UAAU;IACV,iBAAiB;IACjB,UAAU;IACV,yBAAyB;IACzB,UAAU;IACV,UAAU;IACV,UAAU;IACV,oBAAoB;IACpB,UAAU;IACV,cAAc;IACd,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,iBAAiB;IACjB,IAAI;IACJ,IAAI;IACJ,eAAe;IACf,UAAU;IACV,aAAa;IACb,aAAa;IACb,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,mBAAmB;IACnB,eAAe;IACf,sBAAsB;IACtB,aAAa;IACb,yBAAyB;IACzB,oBAAoB;IACpB,qBAAqB;IACrB,WAAW;IACX,UAAU;CACF,CAAC;AACX,MAAM,0BAA0B,GAAG;IACjC,MAAM;IACN,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM;CACE,CAAC;AACX,MAAM,oCAAoC,G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C;AAEX;;;;;;;GAOG;AACH,SAAgB,oBAAoB,CAClC,QAA+B,eAAe;IAE9C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC9B,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,kDAAkD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI;YACpE,0EAA0E,CAC7E,CAAC;IACJ,CAAC;AACH,CAAC"}
package/lib/events.d.ts CHANGED
@@ -12,34 +12,34 @@ export declare const setupEventChannel: () => void;
12
12
  * Publishes a "start" event using both OLD and NEW event types.
13
13
  *
14
14
  * @param data The payload to send with the event. Can be a string or an object.
15
- * @returns A Promise resolving when both events are published.
15
+ * @returns A Promise resolving once both publishes have been attempted.
16
16
  */
17
- export declare const recordStartEvent: (data: string | object) => Promise<void | void[]>;
17
+ export declare const recordStartEvent: (data: string | object) => Promise<void>;
18
18
  /**
19
19
  * Publishes an "error" event using both OLD and NEW event types.
20
20
  *
21
21
  * @param err The Error object containing the error message.
22
22
  * @param subject (Optional) Subject identifier related to the error event.
23
- * @returns A Promise resolving when both events are published.
23
+ * @returns A Promise resolving once both publishes have been attempted.
24
24
  */
25
- export declare const recordErrorEvent: (err: Error, subject?: string) => Promise<void | void[]>;
25
+ export declare const recordErrorEvent: (err: Error, subject?: string) => Promise<void>;
26
26
  /**
27
27
  * Publishes a "success" event using both OLD and NEW event types.
28
28
  *
29
29
  * @param params An object containing the subject and the event data.
30
30
  * @param params.subject A string representing the subject of the event.
31
31
  * @param params.data The payload to send with the event.
32
- * @returns A Promise resolving when both events are published.
32
+ * @returns A Promise resolving once both publishes have been attempted.
33
33
  */
34
34
  export declare const recordSuccessEvent: ({ subject, data, }: {
35
35
  subject: string;
36
36
  data: string | object;
37
- }) => Promise<void | void[]>;
37
+ }) => Promise<void>;
38
38
  /**
39
39
  * Publishes a "completion" event using both OLD and NEW event types.
40
40
  *
41
41
  * @param data The payload to send with the event. Can be a string or an object.
42
- * @returns A Promise resolving when both events are published.
42
+ * @returns A Promise resolving once both publishes have been attempted.
43
43
  */
44
- export declare const recordCompletionEvent: (data: string | object) => Promise<void | void[]>;
44
+ export declare const recordCompletionEvent: (data: string | object) => Promise<void>;
45
45
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAmCA;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,YAM7B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAU,MAAM,MAAM,GAAG,MAAM,2BAc3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAU,KAAK,KAAK,EAAE,UAAU,MAAM,2BAelE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAU,oBAGtC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,2BAeA,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAU,MAAM,MAAM,GAAG,MAAM,2BAchE,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAoCA;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,YAM7B,CAAC;AAkBF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAU,MAAM,MAAM,GAAG,MAAM,kBAY3D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAAU,KAAK,KAAK,EAAE,UAAU,MAAM,kBAalE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAU,oBAGtC;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB,kBAaA,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAU,MAAM,MAAM,GAAG,MAAM,kBAYhE,CAAC"}
package/lib/events.js CHANGED
@@ -50,6 +50,7 @@ exports.recordCompletionEvent = exports.recordSuccessEvent = exports.recordError
50
50
  * limitations under the License.
51
51
  */
52
52
  const eventArc = __importStar(require("firebase-admin/eventarc"));
53
+ const firebase_functions_1 = require("firebase-functions");
53
54
  const { getEventarc } = eventArc;
54
55
  /**
55
56
  * Generates both the OLD and NEW event types to maintain backward compatibility.
@@ -82,18 +83,32 @@ const setupEventChannel = () => {
82
83
  : undefined;
83
84
  };
84
85
  exports.setupEventChannel = setupEventChannel;
86
+ /**
87
+ * Publishes an event, logging and swallowing any failure.
88
+ *
89
+ * A deleted or unreachable Eventarc channel must not fail the invocation: the
90
+ * BigQuery export is the contract, event delivery is best effort.
91
+ */
92
+ const publish = async (event) => {
93
+ if (!eventChannel)
94
+ return;
95
+ try {
96
+ await eventChannel.publish(event);
97
+ }
98
+ catch (err) {
99
+ firebase_functions_1.logger.warn(`Failed to publish Eventarc event ${event.type}`, err);
100
+ }
101
+ };
85
102
  /**
86
103
  * Publishes a "start" event using both OLD and NEW event types.
87
104
  *
88
105
  * @param data The payload to send with the event. Can be a string or an object.
89
- * @returns A Promise resolving when both events are published.
106
+ * @returns A Promise resolving once both publishes have been attempted.
90
107
  */
91
108
  const recordStartEvent = async (data) => {
92
- if (!eventChannel)
93
- return Promise.resolve();
94
109
  const eventTypes = getEventTypes("onStart");
95
110
  // Publish events for both OLD and NEW event types
96
- return Promise.all(eventTypes.map((type) => eventChannel.publish({
111
+ await Promise.all(eventTypes.map((type) => publish({
97
112
  type,
98
113
  data,
99
114
  })));
@@ -104,14 +119,12 @@ exports.recordStartEvent = recordStartEvent;
104
119
  *
105
120
  * @param err The Error object containing the error message.
106
121
  * @param subject (Optional) Subject identifier related to the error event.
107
- * @returns A Promise resolving when both events are published.
122
+ * @returns A Promise resolving once both publishes have been attempted.
108
123
  */
109
124
  const recordErrorEvent = async (err, subject) => {
110
- if (!eventChannel)
111
- return Promise.resolve();
112
125
  const eventTypes = getEventTypes("onError");
113
126
  // Publish events for both OLD and NEW event types
114
- return Promise.all(eventTypes.map((type) => eventChannel.publish({
127
+ await Promise.all(eventTypes.map((type) => publish({
115
128
  type,
116
129
  data: { message: err.message },
117
130
  subject,
@@ -124,14 +137,12 @@ exports.recordErrorEvent = recordErrorEvent;
124
137
  * @param params An object containing the subject and the event data.
125
138
  * @param params.subject A string representing the subject of the event.
126
139
  * @param params.data The payload to send with the event.
127
- * @returns A Promise resolving when both events are published.
140
+ * @returns A Promise resolving once both publishes have been attempted.
128
141
  */
129
142
  const recordSuccessEvent = async ({ subject, data, }) => {
130
- if (!eventChannel)
131
- return Promise.resolve();
132
143
  const eventTypes = getEventTypes("onSuccess");
133
144
  // Publish events for both OLD and NEW event types
134
- return Promise.all(eventTypes.map((type) => eventChannel.publish({
145
+ await Promise.all(eventTypes.map((type) => publish({
135
146
  type,
136
147
  subject,
137
148
  data,
@@ -142,14 +153,12 @@ exports.recordSuccessEvent = recordSuccessEvent;
142
153
  * Publishes a "completion" event using both OLD and NEW event types.
143
154
  *
144
155
  * @param data The payload to send with the event. Can be a string or an object.
145
- * @returns A Promise resolving when both events are published.
156
+ * @returns A Promise resolving once both publishes have been attempted.
146
157
  */
147
158
  const recordCompletionEvent = async (data) => {
148
- if (!eventChannel)
149
- return Promise.resolve();
150
159
  const eventTypes = getEventTypes("onCompletion");
151
160
  // Publish events for both OLD and NEW event types
152
- return Promise.all(eventTypes.map((type) => eventChannel.publish({
161
+ await Promise.all(eventTypes.map((type) => publish({
153
162
  type,
154
163
  data,
155
164
  })));
package/lib/events.js.map CHANGED
@@ -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