-
Notifications
You must be signed in to change notification settings - Fork 150
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
Expose the internal snapshot_ method for public use #2227
Comments
(drive-by comment: this appears to be a similar request to #2057) |
Yea, basically the same request. A sane, official way to convert document event protobufs into something useful. |
Thanks for the suggestion @GriffinJohnston . I'll bring it up with the team. |
Thanks! While we're here I should mention that the ideal would be a function that decodes the incoming protobuf and then also parses the resulting data into a |
Hi @GriffinJohnston , could you elaborate on why you could not use the firebase-functions library in your workflow? |
@ehsannas I'm handling these events with a containerized application on Cloud Run. Maybe I'm missing something, but I haven't found anything in firebase-functions that would be relevant to my situation. |
Hey @ehsannas, We would not want to deploy the exact same Firebase Function a hundred times. In addition to that, the "manual" workflow using eventarc gives us more control over retry settings and dead-letter queues. Are there any updates on exposing such a function so we don't need to build such a parser ourselves? |
What would you like to see in the library?
Currently Firestore document triggers in EventArc are extremely clunky to use. Decoding and then parsing protobuf-encoded payloads provides a poor DX compared to the ease of accessing document data in Firebase Functions. Firebase Functions is able to provide this smooth experience by making use of an internal Firestore method,
snapshot_
found here: snapshot_How it's used in FF: https://github.com/firebase/firebase-functions/blob/master/src/common/providers/firestore.ts
If you expose
snapshot_
as a public method, it will make the experience of using EventArc Firestore Document triggers with something like Cloud Run way better. And since the method already exists, I can't imagine this would be such a big lift. Absolutely huge ROI on this effort for your users. Thanks!Describe alternatives you've considered
Painfully decoding and parsing Protobuf-encoded data
Additional context/notes
I'm posting this here because this is where the internal snapshot_ method lives, but it would make sense to expose this through firebase-admin as well.
The text was updated successfully, but these errors were encountered: