-
Notifications
You must be signed in to change notification settings - Fork 25
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
Outdated proto/google/events/cloud/firestore/v1/data.proto #621
Comments
I've been able to make it work, but I not sure the names are correct:
|
Hi @marcgovi, I did not change anything. My Firestore: My function: I've been able to reproduce it outside Cloud Run:
There is any other way that I can help you get more info? |
@marcgovi Can you post the message encoded as base64?
|
Which event type are you using in the Eventarc trigger? Notice that there are two Firestore modes:
And both have different schemas:
I have the impression that you might have been using the wrong data schema. |
@marcgovi That is it! I was using "google.cloud.datastore.entity.v1.written", but after switching to "google.cloud.firestore.document.v1.written", it now works. What’s the difference between these two? It’s not very intuitive, "google.cloud.datastore.X" appears first in the list, but the code uses "google.cloud.firestore.X" proto by default. It should be smart enough to generate the correct proto based on your selection. |
Great :) To answer your question though, you would use one trigger event type family over the other depending on what Firestore mode you are using (https://cloud.google.com/datastore/docs/firestore-or-datastore). Ultimately, if you are in Native mode you should use You could also wonder why having a Native mode database triggers an event for an event type that's designed for Datastore mode, or vice-versa. This is due to the Firestore event interoperability https://cloud.google.com/firestore/docs/eventarc#datastore_mode_and_native_mode_event_interoperability. |
The
proto/google/events/cloud/firestore/v1/data.proto
file does not work properly with the Firestore message.Steps to reproduce
The console.log provided in the example is broken. The entire object is incorrectly placed in the name field, as shown below:
A binary file as base64 example:
Using protoc to show the structure:
It show this structure:
The text was updated successfully, but these errors were encountered: