@firebase-function-kits/firestore-bigquery-export 0.0.2-rc.11 → 0.0.2-rc.13
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 +3 -0
- package/README.md +176 -49
- package/lib/config.d.ts +9 -0
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +40 -2
- package/lib/config.js.map +1 -1
- package/lib/events.d.ts +8 -8
- package/lib/events.d.ts.map +1 -1
- package/lib/events.js +32 -19
- package/lib/events.js.map +1 -1
- package/lib/handlers.d.ts.map +1 -1
- package/lib/handlers.js +20 -35
- package/lib/handlers.js.map +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +13 -2
- package/lib/index.js.map +1 -1
- package/lib/region.d.ts +4 -2
- package/lib/region.d.ts.map +1 -1
- package/lib/region.js +7 -4
- package/lib/region.js.map +1 -1
- package/npm-shrinkwrap.json +379 -85
- package/package.json +3 -3
- package/src/config.ts +46 -2
- package/src/events.ts +36 -23
- package/src/handlers.ts +20 -33
- package/src/index.ts +18 -3
- package/src/region.ts +7 -4
- package/tests/eventarc-outage.test.ts +119 -0
- package/tests/events.test.ts +49 -7
- package/tests/handlers.test.ts +0 -14
- package/tests/region.test.ts +18 -0
- package/tests/required-apis.test.ts +6 -2
- package/tests/required-params.test.ts +138 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
- 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.
|
|
2
|
+
|
|
3
|
+
- 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
4
|
- 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
5
|
- 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
6
|
- 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
|
@@ -24,15 +24,16 @@ below, enables the listed APIs, and attaches the account to every function in
|
|
|
24
24
|
this kit. Do not set a custom runtime service account for this codebase — it
|
|
25
25
|
conflicts with that automatic setup.
|
|
26
26
|
|
|
27
|
-
| Role / API | Why
|
|
28
|
-
| ------------------------------ |
|
|
29
|
-
| `roles/bigquery.dataEditor` | create dataset/table/views; insert rows
|
|
30
|
-
| `roles/bigquery.user` | run BigQuery jobs and materialized views
|
|
31
|
-
| `roles/datastore.user` | write failed-row records back to Firestore (only if you configure a backup collection)
|
|
32
|
-
| `roles/eventarc.eventReceiver` | receive Gen2 Firestore trigger events
|
|
33
|
-
| `roles/run.invoker` | allow Eventarc to invoke the Gen2 Cloud Run service
|
|
34
|
-
| `roles/
|
|
35
|
-
| `
|
|
27
|
+
| Role / API | Why |
|
|
28
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
29
|
+
| `roles/bigquery.dataEditor` | create dataset/table/views; insert rows |
|
|
30
|
+
| `roles/bigquery.user` | run BigQuery jobs and materialized views |
|
|
31
|
+
| `roles/datastore.user` | write failed-row records back to Firestore (only if you configure a backup collection) |
|
|
32
|
+
| `roles/eventarc.eventReceiver` | receive Gen2 Firestore trigger events |
|
|
33
|
+
| `roles/run.invoker` | allow Eventarc to invoke the Gen2 Cloud Run service |
|
|
34
|
+
| `roles/eventarc.publisher` | publish the kit's custom Eventarc events (the Extensions platform granted this implicitly) |
|
|
35
|
+
| `roles/cloudtasks.enqueuer` | enqueue failed writes onto the kit's own `syncBigQuery` task queue |
|
|
36
|
+
| `bigquery.googleapis.com` | mirror Firestore collection changes in BigQuery |
|
|
36
37
|
|
|
37
38
|
If the dataset lives in a different project (`BIGQUERY_PROJECT_ID`), grant the
|
|
38
39
|
managed runtime service account the `bigquery.*` roles on that project. For a
|
|
@@ -120,7 +121,7 @@ loads them at deploy time and prompts for any required values that are missing.
|
|
|
120
121
|
| `datasetId` | `DATASET_ID` | no | `firestore_export` | BigQuery dataset |
|
|
121
122
|
| `tableId` | `TABLE_ID` | no | `posts` | BigQuery changelog table |
|
|
122
123
|
| `databaseRegion` | `DATABASE_REGION` | yes | (prompted) | Firestore database location; also places the functions |
|
|
123
|
-
| `datasetLocation` | `DATASET_LOCATION` | no | `us` | BigQuery dataset location
|
|
124
|
+
| `datasetLocation` | `DATASET_LOCATION` | no | `us` | BigQuery dataset location, used only when the dataset is created |
|
|
124
125
|
| `database` | `DATABASE` | no | `(default)` | Firestore database id |
|
|
125
126
|
| `bigqueryProjectId` | `BIGQUERY_PROJECT_ID` | no | project id | Dataset project, if different |
|
|
126
127
|
| `backupCollection` | `BACKUP_COLLECTION` | no | (empty) | Strongly recommended: collection for rows whose BigQuery insert failed |
|
|
@@ -169,19 +170,27 @@ the instances cannot collide.
|
|
|
169
170
|
|
|
170
171
|
## Events
|
|
171
172
|
|
|
172
|
-
When `EVENTARC_CHANNEL` is configured, the functions publish lifecycle events
|
|
173
|
-
|
|
174
|
-
`
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
When `EVENTARC_CHANNEL` is configured, the functions publish lifecycle events:
|
|
174
|
+
`onStart` and `onError` from the write path, and `onSuccess` from the
|
|
175
|
+
`syncBigQuery` task when a buffered write lands (matching the extension, which
|
|
176
|
+
only emitted `onSuccess` from its queue handler).
|
|
177
|
+
|
|
178
|
+
Each event is published twice, exactly as the extension published it: once
|
|
179
|
+
under `firebase.extensions.firestore-bigquery-export.v1.*` and once under
|
|
180
|
+
`firebase.extensions.firestore-counter.v1.*`. The `firestore-counter` type is a
|
|
181
|
+
historical naming mistake the extension kept for backwards compatibility, and
|
|
182
|
+
the kit keeps it for the same reason: triggers listening on it survive the
|
|
183
|
+
migration. The two copies carry the same `data` and `subject`, and only differ
|
|
184
|
+
by `type`. Write new triggers against the `firestore-bigquery-export` types.
|
|
177
185
|
|
|
178
186
|
Publishing is filtered by `EXT_SELECTED_EVENTS`: the value is split on commas
|
|
179
187
|
and only exactly matching event types are published, silently. An empty value
|
|
180
188
|
suppresses every event, and a value carrying only another product's types
|
|
181
189
|
(the extension offered more than one namespace to tick) publishes nothing. A
|
|
182
190
|
config exported from the extension brings its `EXT_SELECTED_EVENTS` along, so
|
|
183
|
-
check it lists the `
|
|
184
|
-
|
|
191
|
+
check it lists the types you expect, `onSuccess` included. It gates the legacy
|
|
192
|
+
`firestore-counter` copies too, so a trigger on a legacy type only fires when
|
|
193
|
+
that legacy type is listed.
|
|
185
194
|
|
|
186
195
|
## Provisioning
|
|
187
196
|
|
|
@@ -195,6 +204,13 @@ Deploy wiring (declared in the package):
|
|
|
195
204
|
- First deploy runs `initBigQuerySync` automatically (`afterFirstDeploy`).
|
|
196
205
|
- Later deploys run `setupBigQuerySync` automatically (`afterRedeploy`).
|
|
197
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
|
+
|
|
198
214
|
`initBigQuerySync` and `setupBigQuerySync` call the same handler; they exist as
|
|
199
215
|
separate task functions so first-deploy and redeploy can target different
|
|
200
216
|
queues, matching the extension's install vs update/configure split.
|
|
@@ -243,7 +259,9 @@ missing when a write arrives, the inline write fails and the change buffers
|
|
|
243
259
|
through the `syncBigQuery` queue, which re-attempts the write on Cloud Tasks'
|
|
244
260
|
schedule. The queue handler does not provision, as in the extension: if the
|
|
245
261
|
resources are still missing the retries fail and the row lands in
|
|
246
|
-
`BACKUP_COLLECTION`; run the lifecycle task
|
|
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.
|
|
247
265
|
|
|
248
266
|
## Failure handling
|
|
249
267
|
|
|
@@ -342,6 +360,92 @@ them.
|
|
|
342
360
|
documents get there first; `EXCLUDE_OLD_DATA=yes` halves the payload. Same as
|
|
343
361
|
the extension.
|
|
344
362
|
|
|
363
|
+
## Migrating from the extension
|
|
364
|
+
|
|
365
|
+
### Avoiding the cutover gap
|
|
366
|
+
|
|
367
|
+
`firebase ext:migrate` deploys the kit and then uninstalls the extension. The
|
|
368
|
+
extension's trigger stops delivering as it is uninstalled, while the kit's
|
|
369
|
+
trigger is newly created and takes a few minutes to deliver reliably, so writes
|
|
370
|
+
made in between can reach neither exporter. Those writes are never seen by a
|
|
371
|
+
function, so they appear in neither the changelog nor `BACKUP_COLLECTION`, and
|
|
372
|
+
the command reports no error.
|
|
373
|
+
|
|
374
|
+
To migrate without that gap, keep both exporters running until the kit is
|
|
375
|
+
confirmed to be working.
|
|
376
|
+
|
|
377
|
+
Run `ext:migrate` without `--force` and answer no when it asks whether to
|
|
378
|
+
uninstall the extension. That question comes last, after the kit has deployed.
|
|
379
|
+
The prompts before it cover the migration and the kit installation, so
|
|
380
|
+
declining one of those aborts the migration instead.
|
|
381
|
+
|
|
382
|
+
Both exporters are now live, each logging under its own function name:
|
|
383
|
+
`ext-<instance-id>-fsexportbigquery` for the extension and
|
|
384
|
+
`kit-<instance-id>-fsexportbigquery` for the kit. Follow the kit's:
|
|
385
|
+
|
|
386
|
+
```shell
|
|
387
|
+
firebase functions:log --only kit-<instance-id>-fsexportbigquery --project <project-id>
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
At the default `LOG_LEVEL` of `info`, each delivered write logs `Firestore
|
|
391
|
+
event received by onDocumentWritten trigger` with the document name; `warn` and
|
|
392
|
+
above suppress that line. Write to the collection and confirm the kit records
|
|
393
|
+
every write rather than an intermittent few. A newly created trigger commonly
|
|
394
|
+
needs several minutes to reach that point. Then uninstall the extension:
|
|
395
|
+
|
|
396
|
+
```shell
|
|
397
|
+
firebase ext:uninstall <instance-id> --project <project-id> --immediate
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
Running both exporters together is safe. Both triggers receive the same event
|
|
401
|
+
id, and the changelog row carries it as its BigQuery insert id, so BigQuery
|
|
402
|
+
collapses the second copy. Deduplication is best effort, but a duplicate row
|
|
403
|
+
would not change the latest view, which reports one row per document.
|
|
404
|
+
|
|
405
|
+
### Recovering documents missed during the gap
|
|
406
|
+
|
|
407
|
+
If the cutover gap has already occurred, re-import the collection with
|
|
408
|
+
`fs-bq-import-collection` from the extension repository, pointed at the dataset
|
|
409
|
+
and table prefix the kit writes to. In non-interactive mode the script requires
|
|
410
|
+
the project, collection path, dataset, table prefix,
|
|
411
|
+
`--query-collection-group` and `--dataset-location`:
|
|
412
|
+
|
|
413
|
+
```shell
|
|
414
|
+
npx @firebaseextensions/fs-bq-import-collection \
|
|
415
|
+
--non-interactive \
|
|
416
|
+
--project <project-id> \
|
|
417
|
+
--source-collection-path <COLLECTION_PATH> \
|
|
418
|
+
--dataset <DATASET_ID> \
|
|
419
|
+
--table-name-prefix <TABLE_ID> \
|
|
420
|
+
--query-collection-group false \
|
|
421
|
+
--dataset-location <DATASET_LOCATION> \
|
|
422
|
+
--firestore-instance-id <DATABASE>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
Import only once the kit is exporting, and pause writes to the collection while
|
|
426
|
+
it runs: the script reads each document and writes its row shortly afterwards,
|
|
427
|
+
so a write streamed mid-import can be superseded by the import row until that
|
|
428
|
+
document changes again.
|
|
429
|
+
|
|
430
|
+
Before importing, note what it does and does not restore:
|
|
431
|
+
|
|
432
|
+
- The script imports the entire collection; it cannot target a subset. Every
|
|
433
|
+
document receives one `IMPORT` row holding its current value. Import rows
|
|
434
|
+
carry no event id, so running the import again adds a further row per
|
|
435
|
+
document rather than replacing the earlier one.
|
|
436
|
+
- Rows are stamped with the time the import runs, so afterwards every document
|
|
437
|
+
reports operation `IMPORT` in the latest view. Current values remain correct
|
|
438
|
+
and the preceding rows remain in the changelog, but the latest view no longer
|
|
439
|
+
reflects the last real operation. (The extension's import guide describes
|
|
440
|
+
these rows as carrying an epoch timestamp; version 0.1.27 uses the import
|
|
441
|
+
time.)
|
|
442
|
+
- Deletes cannot be recovered, because the import reflects only what Firestore
|
|
443
|
+
holds when it runs. A document deleted during the gap is no longer there to
|
|
444
|
+
import, so the delete never reaches the changelog and the document stays
|
|
445
|
+
visible in the latest view with its last exported value. An update that a
|
|
446
|
+
later write superseded is likewise unavailable, since only the current value
|
|
447
|
+
is imported.
|
|
448
|
+
|
|
345
449
|
## Differences from the Stream Firestore to BigQuery extension
|
|
346
450
|
|
|
347
451
|
This kit is the extension repackaged as an npm package, but a few things behave
|
|
@@ -366,20 +470,6 @@ inside that window. That property is gone by design - a row that exhausts the
|
|
|
366
470
|
queue without a configured `BACKUP_COLLECTION` is dropped, exactly as in the
|
|
367
471
|
extension. Set `BACKUP_COLLECTION`.
|
|
368
472
|
|
|
369
|
-
### Events
|
|
370
|
-
|
|
371
|
-
Events are published under `firebase.extensions.firestore-bigquery-export.v1.*`
|
|
372
|
-
only. The extension also published a duplicate copy of every event under
|
|
373
|
-
`firebase.extensions.firestore-counter.v1.*`, a historical naming mistake kept
|
|
374
|
-
for backwards compatibility. If you have Eventarc triggers listening on those
|
|
375
|
-
`firestore-counter` types, point them at the `firestore-bigquery-export` types.
|
|
376
|
-
|
|
377
|
-
### Wildcard columns include the document ID
|
|
378
|
-
|
|
379
|
-
With `WILDCARD_IDS=true`, the wildcard column now contains a `documentId` key
|
|
380
|
-
alongside the path parameters from your collection path. The extension wrote
|
|
381
|
-
the path parameters only.
|
|
382
|
-
|
|
383
473
|
### DATABASE_REGION places the functions
|
|
384
474
|
|
|
385
475
|
The extension's `LOCATION` parameter is gone. Instead, the kit deploys its
|
|
@@ -396,23 +486,38 @@ it is honored: the functions deploy near your database.
|
|
|
396
486
|
|
|
397
487
|
Placement needs firebase-tools 15.28.0 or later - older CLIs do not load
|
|
398
488
|
`.env` values during deploy discovery, so the functions silently fall back to
|
|
399
|
-
the no-region behavior below.
|
|
400
|
-
deploy. Upgrading the CLI (or this kit, if your `.env` already carried
|
|
489
|
+
the no-region behavior below. Upgrading the CLI (or this kit, if your `.env` already carried
|
|
401
490
|
`DATABASE_REGION`) can itself trigger the region move described below on your
|
|
402
|
-
next deploy.
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
491
|
+
next deploy.
|
|
492
|
+
|
|
493
|
+
`firebase functions:kits:install` and `firebase ext:migrate` prompt for this
|
|
494
|
+
value and write it to `.env` before anything is deployed, so a single deploy
|
|
495
|
+
places the functions correctly. If you instead run `firebase deploy` with the
|
|
496
|
+
value still missing from `.env`, the prompt comes after discovery has already
|
|
497
|
+
chosen a region, so your answer only takes effect on the following deploy.
|
|
498
|
+
|
|
499
|
+
`firebase ext:migrate` also writes `FUNCTION_DEFAULT_REGION` to your `.env`,
|
|
500
|
+
recording where the extension's functions ran. Nothing reads it: placement
|
|
501
|
+
comes from `DATABASE_REGION` alone, so if the two disagree your next deploy
|
|
502
|
+
moves the functions.
|
|
503
|
+
|
|
504
|
+
With an explicit empty `DATABASE_REGION=` line in `.env`, the functions declare
|
|
505
|
+
no region and the Firebase CLI resolves one at deploy time: a function keeps
|
|
506
|
+
the region it is already deployed in, and on a first deploy all four land in
|
|
507
|
+
`us-central1`. The CLI would otherwise place `fsexportbigquery` next to the
|
|
508
|
+
database, but it resolves the default region before it resolves params, so the
|
|
509
|
+
`DATABASE` param this kit passes to the trigger is still an unresolved
|
|
510
|
+
expression when the database is looked up, and the lookup falls back
|
|
511
|
+
([firebase/firebase-tools#11020](https://github.com/firebase/firebase-tools/issues/11020)).
|
|
512
|
+
Setting the `FIREBASE_FUNCTIONS_DEFAULT_REGION` environment variable when
|
|
513
|
+
running `firebase deploy` puts all of them in that region instead. Careful
|
|
514
|
+
with that variable: it applies to every no-region function in the deploy, not
|
|
515
|
+
just this kit. Omitting the line is not the same as an empty one: a
|
|
516
|
+
non-interactive deploy fails with `In non-interactive mode but have no value
|
|
517
|
+
for the following environment variables: DATABASE_REGION`. Note that changing
|
|
518
|
+
an existing install's function region (via this variable or `DATABASE_REGION`)
|
|
519
|
+
deletes and recreates the functions in the new region - new URLs, a recreated
|
|
520
|
+
task queue, and any in-flight tasks are lost.
|
|
416
521
|
|
|
417
522
|
### Defaults
|
|
418
523
|
|
|
@@ -420,6 +525,26 @@ Two settings now have defaults rather than being passed through empty:
|
|
|
420
525
|
`DATASET_LOCATION` defaults to `us`, and `BIGQUERY_PROJECT_ID` defaults to the
|
|
421
526
|
project the functions are deployed to.
|
|
422
527
|
|
|
528
|
+
### DATASET_LOCATION is not immutable
|
|
529
|
+
|
|
530
|
+
The extension declared `DATASET_LOCATION` as immutable, so a reconfigure could
|
|
531
|
+
not change it; moving the dataset meant uninstalling and reinstalling. The kit
|
|
532
|
+
cannot enforce that: `firebase-functions/params` has no immutability, so a
|
|
533
|
+
redeploy accepts any new value. The value only reaches BigQuery when the
|
|
534
|
+
lifecycle task creates the dataset. On a redeploy the task finds the existing
|
|
535
|
+
dataset by id and skips creation, so the dataset stays where it is and the new
|
|
536
|
+
value is ignored, with no error and no warning. Nothing else reads it: writes,
|
|
537
|
+
views, and the `syncBigQuery` queue address the dataset by id and BigQuery
|
|
538
|
+
resolves the location itself, so a mismatched `.env` keeps working.
|
|
539
|
+
|
|
540
|
+
To export to a different location, point the kit at a new dataset: set a new
|
|
541
|
+
`DATASET_ID` together with the new `DATASET_LOCATION` and redeploy. The
|
|
542
|
+
redeploy lifecycle task creates the new dataset in the new location; the old
|
|
543
|
+
dataset is left behind with its table and view, as in the extension when the
|
|
544
|
+
dataset id changes. Existing documents do not follow. Backfill them with
|
|
545
|
+
`fs-bq-import-collection` from the extension repository (see "Tooling that is
|
|
546
|
+
not included" below).
|
|
547
|
+
|
|
423
548
|
### Tooling that is not included
|
|
424
549
|
|
|
425
550
|
The extension shipped companion scripts that this package does not:
|
|
@@ -432,7 +557,9 @@ The extension shipped companion scripts that this package does not:
|
|
|
432
557
|
|
|
433
558
|
`IMPORT_COLLECTION_PATH` is not a setting here. If you rely on any of these,
|
|
434
559
|
keep using the versions from the extension repository. They operate on the same
|
|
435
|
-
BigQuery changelog table, so they still work against data this kit writes.
|
|
560
|
+
BigQuery changelog table, so they still work against data this kit writes. See
|
|
561
|
+
"Migrating from the extension" for using `fs-bq-import-collection` to recover
|
|
562
|
+
documents missed during a migration.
|
|
436
563
|
|
|
437
564
|
## API surface
|
|
438
565
|
|
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
|
package/lib/config.d.ts.map
CHANGED
|
@@ -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,CA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AAE,MAAM,GAAG,SAAS,CAAC;IAC9C,8BAA8B,EAAE,MAAM,GAAG,SAAS,CAAC;CACpD,GAAG,mBAAmB,CAAC,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;
|
|
@@ -106,8 +107,9 @@ const params = {
|
|
|
106
107
|
input: { text: { example: "(default)" } },
|
|
107
108
|
}),
|
|
108
109
|
// Declared so the CLI prompts for the value and persists it to `.env`; the
|
|
109
|
-
//
|
|
110
|
-
// reads the same variable from
|
|
110
|
+
// location to Cloud Run region lookup needs a nested ternary the CLI's CEL
|
|
111
|
+
// subset cannot express, so the entry point reads the same variable from
|
|
112
|
+
// `process.env` at module load instead.
|
|
111
113
|
databaseRegion: (0, params_1.defineString)("DATABASE_REGION", {
|
|
112
114
|
label: "Firestore Instance Location",
|
|
113
115
|
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 +569,40 @@ function configFromEnv() {
|
|
|
567
569
|
maxEnqueueAttempts: optionalInt(params.maxEnqueueAttempts),
|
|
568
570
|
};
|
|
569
571
|
}
|
|
572
|
+
// Params the published extension marks `required: true`. A value the user never
|
|
573
|
+
// supplied is absent from process.env; one they deliberately blanked is present
|
|
574
|
+
// and empty. Only the second is a misconfiguration, so the guard below reads
|
|
575
|
+
// process.env rather than `.value()`, which reports both as "".
|
|
576
|
+
// DATABASE_REGION is `required: true` upstream but deliberately omitted here:
|
|
577
|
+
// an explicit empty value is a supported setting that leaves the function
|
|
578
|
+
// without a declared region, so the CLI resolves one at deploy time.
|
|
579
|
+
const REQUIRED_PARAMS = [
|
|
580
|
+
"DATASET_LOCATION",
|
|
581
|
+
"BIGQUERY_PROJECT_ID",
|
|
582
|
+
"DATABASE",
|
|
583
|
+
"COLLECTION_PATH",
|
|
584
|
+
"DATASET_ID",
|
|
585
|
+
"TABLE_ID",
|
|
586
|
+
"VIEW_TYPE",
|
|
587
|
+
"USE_NEW_SNAPSHOT_QUERY_SYNTAX",
|
|
588
|
+
"LOG_LEVEL",
|
|
589
|
+
];
|
|
590
|
+
/**
|
|
591
|
+
* Rejects required params that were explicitly set to an empty value.
|
|
592
|
+
*
|
|
593
|
+
* `.env` values bypass the CLI's prompt-time validation and take precedence
|
|
594
|
+
* over a param's declared default, so an empty entry otherwise reaches the
|
|
595
|
+
* handlers silently. Called at module scope so deploy-time discovery fails
|
|
596
|
+
* before the function ships, rather than on the first event.
|
|
597
|
+
*/
|
|
598
|
+
function assertRequiredParams(names = REQUIRED_PARAMS) {
|
|
599
|
+
const blank = names.filter((name) => {
|
|
600
|
+
const raw = process.env[name];
|
|
601
|
+
return raw !== undefined && raw.trim() === "";
|
|
602
|
+
});
|
|
603
|
+
if (blank.length > 0) {
|
|
604
|
+
throw new Error(`Required parameters are set to an empty value: ${blank.join(", ")}. ` +
|
|
605
|
+
"Set them in your .env file, or remove the entries to use their defaults.");
|
|
606
|
+
}
|
|
607
|
+
}
|
|
570
608
|
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config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CACH,CAAC;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
|
|
15
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
16
16
|
*/
|
|
17
|
-
export declare const recordStartEvent: (data: string | object) => Promise<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
|
|
23
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
24
24
|
*/
|
|
25
|
-
export declare const recordErrorEvent: (err: Error, subject?: string) => Promise<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
|
|
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
|
|
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
|
|
42
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
43
43
|
*/
|
|
44
|
-
export declare const recordCompletionEvent: (data: string | object) => Promise<void
|
|
44
|
+
export declare const recordCompletionEvent: (data: string | object) => Promise<void>;
|
|
45
45
|
//# sourceMappingURL=events.d.ts.map
|
package/lib/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"
|
|
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,15 +50,20 @@ 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.
|
|
57
|
+
*
|
|
58
|
+
* Old Event Type: firebase.extensions.firestore-counter.v1.{eventName}
|
|
59
|
+
* New Event Type: firebase.extensions.firestore-bigquery-export.v1.{eventName}
|
|
56
60
|
*
|
|
57
61
|
* @param eventName The name of the event (e.g., "onStart", "onError", etc.)
|
|
58
|
-
* @returns
|
|
62
|
+
* @returns An array containing both the old and new event types
|
|
59
63
|
*/
|
|
60
64
|
const getEventTypes = (eventName) => [
|
|
61
|
-
`firebase.extensions.firestore-
|
|
65
|
+
`firebase.extensions.firestore-counter.v1.${eventName}`, // OLD Event Type for backward compatibility
|
|
66
|
+
`firebase.extensions.firestore-bigquery-export.v1.${eventName}`, // NEW Event Type following the updated convention
|
|
62
67
|
];
|
|
63
68
|
let eventChannel;
|
|
64
69
|
/**
|
|
@@ -78,18 +83,32 @@ const setupEventChannel = () => {
|
|
|
78
83
|
: undefined;
|
|
79
84
|
};
|
|
80
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
|
+
};
|
|
81
102
|
/**
|
|
82
103
|
* Publishes a "start" event using both OLD and NEW event types.
|
|
83
104
|
*
|
|
84
105
|
* @param data The payload to send with the event. Can be a string or an object.
|
|
85
|
-
* @returns A Promise resolving
|
|
106
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
86
107
|
*/
|
|
87
108
|
const recordStartEvent = async (data) => {
|
|
88
|
-
if (!eventChannel)
|
|
89
|
-
return Promise.resolve();
|
|
90
109
|
const eventTypes = getEventTypes("onStart");
|
|
91
110
|
// Publish events for both OLD and NEW event types
|
|
92
|
-
|
|
111
|
+
await Promise.all(eventTypes.map((type) => publish({
|
|
93
112
|
type,
|
|
94
113
|
data,
|
|
95
114
|
})));
|
|
@@ -100,14 +119,12 @@ exports.recordStartEvent = recordStartEvent;
|
|
|
100
119
|
*
|
|
101
120
|
* @param err The Error object containing the error message.
|
|
102
121
|
* @param subject (Optional) Subject identifier related to the error event.
|
|
103
|
-
* @returns A Promise resolving
|
|
122
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
104
123
|
*/
|
|
105
124
|
const recordErrorEvent = async (err, subject) => {
|
|
106
|
-
if (!eventChannel)
|
|
107
|
-
return Promise.resolve();
|
|
108
125
|
const eventTypes = getEventTypes("onError");
|
|
109
126
|
// Publish events for both OLD and NEW event types
|
|
110
|
-
|
|
127
|
+
await Promise.all(eventTypes.map((type) => publish({
|
|
111
128
|
type,
|
|
112
129
|
data: { message: err.message },
|
|
113
130
|
subject,
|
|
@@ -120,14 +137,12 @@ exports.recordErrorEvent = recordErrorEvent;
|
|
|
120
137
|
* @param params An object containing the subject and the event data.
|
|
121
138
|
* @param params.subject A string representing the subject of the event.
|
|
122
139
|
* @param params.data The payload to send with the event.
|
|
123
|
-
* @returns A Promise resolving
|
|
140
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
124
141
|
*/
|
|
125
142
|
const recordSuccessEvent = async ({ subject, data, }) => {
|
|
126
|
-
if (!eventChannel)
|
|
127
|
-
return Promise.resolve();
|
|
128
143
|
const eventTypes = getEventTypes("onSuccess");
|
|
129
144
|
// Publish events for both OLD and NEW event types
|
|
130
|
-
|
|
145
|
+
await Promise.all(eventTypes.map((type) => publish({
|
|
131
146
|
type,
|
|
132
147
|
subject,
|
|
133
148
|
data,
|
|
@@ -138,14 +153,12 @@ exports.recordSuccessEvent = recordSuccessEvent;
|
|
|
138
153
|
* Publishes a "completion" event using both OLD and NEW event types.
|
|
139
154
|
*
|
|
140
155
|
* @param data The payload to send with the event. Can be a string or an object.
|
|
141
|
-
* @returns A Promise resolving
|
|
156
|
+
* @returns A Promise resolving once both publishes have been attempted.
|
|
142
157
|
*/
|
|
143
158
|
const recordCompletionEvent = async (data) => {
|
|
144
|
-
if (!eventChannel)
|
|
145
|
-
return Promise.resolve();
|
|
146
159
|
const eventTypes = getEventTypes("onCompletion");
|
|
147
160
|
// Publish events for both OLD and NEW event types
|
|
148
|
-
|
|
161
|
+
await Promise.all(eventTypes.map((type) => publish({
|
|
149
162
|
type,
|
|
150
163
|
data,
|
|
151
164
|
})));
|