-
Notifications
You must be signed in to change notification settings - Fork 431
fix(firestore-bigquery-export): republish the legacy firestore-counter event types #3111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: kits
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,13 +18,17 @@ import * as eventArc from "firebase-admin/eventarc"; | |
| const { getEventarc } = eventArc; | ||
|
|
||
| /** | ||
| * Builds the Eventarc event type for this extension. | ||
| * Generates both the OLD and NEW event types to maintain backward compatibility. | ||
| * | ||
| * Old Event Type: firebase.extensions.firestore-counter.v1.{eventName} | ||
| * New Event Type: firebase.extensions.firestore-bigquery-export.v1.{eventName} | ||
| * | ||
| * @param eventName The name of the event (e.g., "onStart", "onError", etc.) | ||
| * @returns The event type string. | ||
| * @returns An array containing both the old and new event types | ||
| */ | ||
| const getEventTypes = (eventName: string) => [ | ||
| `firebase.extensions.firestore-bigquery-export.v1.${eventName}`, | ||
| `firebase.extensions.firestore-counter.v1.${eventName}`, // OLD Event Type for backward compatibility | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocking, and I don't think the code should change here since this is exactly the parity the PR is restoring. Worth noting though: this type is byte-identical to the type the firestore-counter kit publishes today ( In the extension this was accepted history, but in the kits world both are first-class packages someone may deploy side by side, so it might be worth a line in the differences entry with that mitigation named.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, this is something worth considering.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's a valid point but like you say, for parity this is a follow-up |
||
| `firebase.extensions.firestore-bigquery-export.v1.${eventName}`, // NEW Event Type following the updated convention | ||
| ]; | ||
|
CorieW marked this conversation as resolved.
|
||
|
|
||
| let eventChannel: eventArc.Channel | undefined; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking. This holds only when
EXT_SELECTED_EVENTSis unset, which this README doesn't mention anywhere (the other kit READMEs do:firestore-counter,firestore-send-email,firestore-vector-search,speech-to-text).firebase-toolsallowlistedEXT_SELECTED_EVENTSfor.envandext:exportwrites it, so a migrating user can land with it set to thefirestore-bigquery-exporttypes only, their legacy triggers stay dark, and nothing in the doc points at the knob.Going the other way, unset (the kit default, since no kit manifest declares events) means both copies publish, so two Eventarc RPCs per write on a path where a publish failure rethrows in
handleWriteand aborts the BigQuery export. A sentence namingEXT_SELECTED_EVENTSwould cover both directions.