Trigger cloud run from the event : GCS object create, using Eventarc API

944 Views Asked by At

I am trying to build a python cloud run service that would be triggered whenever a file is uploaded in a google cloud storage bucket. Although, when I see the logs, the service is not triggered while I have created an Eventarc trigger for the same, already. I cannot find any entries in the cloud run service logs, but the trigger tab shows an Eventarc trigger associated with it.[![Cloud Run Trigger Image][1]][1] [![Cloud Run Logs][2]][2]

Any ideas or links that can help me here? [1]: https://i.stack.imgur.com/ijjh2.png [2]: https://i.stack.imgur.com/QhFhk.png

1

There are 1 best solutions below

0
On

In your logs, the line

booting worker with pid: 4

indicates, that your cloud run instance did indeed got triggered, but might have failed to boot, because there is no further log output.

To debug, deploy a demo cloud run function that just logs the incoming message. Thus, it will be easier to see whether it has been triggered (and with what payload).

There is an easy Tutorial from Google along these lines.