googleapis / googleapis/google-cloudevents

Outdated proto/google/events/cloud/firestore/v1/data.proto

Open
#621 7 comments 0 reactions 0 assignees View on GitHub
api: eventarc external priority: p2 status: blocked type: bug
Dominant language
JavaScript
Stars
171
Forks
34
PR merge metrics
No merged PRs in 30d

Description

The `proto/google/events/cloud/firestore/v1/data.proto` file does not work properly with the Firestore message.

#### Steps to reproduce

1. Go to Cloud Run
2. Write a Function
3. Select the Runtime "Node 22"
4. Add Trigger -> Firestore trigger
5. Save Trigger
6. Create
7. Wait it to deploy
8. Change any document on Firestore

The console.log provided in the example is broken. The entire object is incorrectly placed in the name field, as shown below:

![Image](https://github.com/user-attachments/assets/e3579dd2-b596-4b9d-b083-b73a456f2131)

A binary file as base64 example:
```
CuUBCscBCngKDRILc351ZWxsby1wb2MSHgoGZHJpdmVyGhRLcnVQeWlGcWNIdGtDOEJRYlZ1bxIpChFpbl9wcm9ncmVzc19yb3V0ZRoUWlF6M0tEekVMT3F4ZFJreDVNQmwSHAoEam9icxoUNlNpcUdTS3lnU3RzbGd2UXA2dmMaDQoCaWQSBxDvkTiYAQEaIQoEZGVwcxIZShcKBxDtkTiYAQEKDIoBBjkxOTc5MJgBARoZCgZzdGF0dXMSD4oBCWJsb2NrZWQxM5gBASoMCJO2urwGEJj66LUDMgsIufvcugYQoMXwDhLlAQrHAQp4Cg0SC3N+dWVsbG8tcG9jEh4KBmRyaXZlchoUS3J1UHlpRnFjSHRrQzhCUWJWdW8SKQoRaW5fcHJvZ3Jlc3Nfcm91dGUaFFpRejNLRHpFTE9xeGRSa3g1TUJsEhwKBGpvYnMaFDZTaXFHU0t5Z1N0c2xndlFwNnZjGg0KAmlkEgcQ75E4mAEBGiEKBGRlcHMSGUoXCgcQ7ZE4mAEBCgyKAQY5MTk3OTCYAQEaGQoGc3RhdHVzEg+KAQlibG9ja2VkMTKYAQEqDAiZsbq8BhCYjbGOAzILCLn73LoGEKDF8A4aCAoGc3RhdHVz
```

Using protoc to show the structure:
```
echo "BASE64_STRING" | base64 -d > message.bin
protoc --decode_raw < message.bin
```

It show this structure:
```
1 {
1 {
1 {
1 {
2: "s~uello-poc"
}
2 {
1: "driver"
3: "KruPyiFqcHtkC8BQbVuo"
}
2 {
1: "in_progress_route"
3: "ZQz3KDzELOqxdRkx5MBl"
}
2 {
1: "jobs"
3: "6SiqGSKygStslgvQp6vc"
}
}
3 {
1: "id"
2 {
2: 919791
19: 1
}
}
3 {
1: "deps"
2 {
9 {
1 {
2: 919789
19: 1
}
1 {
17: "919790"
19: 1
}
}
}
}
3 {
1: "status"
2 {
17: "blocked13"
19: 1
}
}
}
5 {
1: 1737399059
2: 918175000
}
6 {
1: 1733770681
2: 31204000
}
}
2 {
1 {
1 {
1 {
2: "s~uello-poc"
}
2 {
1: "driver"
3: "KruPyiFqcHtkC8BQbVuo"
}
2 {
1: "in_progress_route"
3: "ZQz3KDzELOqxdRkx5MBl"
}
2 {
1: "jobs"
3: "6SiqGSKygStslgvQp6vc"
}
}
3 {
1: "id"
2 {
2: 919791
19: 1
}
}
3 {
1: "deps"
2 {
9 {
1 {
2: 919789
19: 1
}
1 {
17: "919790"
19: 1
}
}
}
}
3 {
1: "status"
2 {
17: "blocked12"
19: 1
}
}
}
5 {
1: 1737398425
2: 835471000
}
6 {
1: 1733770681
2: 31204000
}
}
3 {
1: "status"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.