`deploy-succeeded` function irregularly invoked

I have set up a deploy-succeeded function, which, from what I understand, should be invoked every time the parent repository has finished deployment. It appears that it is not invoked systematically, oftentimes, it is not even invoked.

Is there any requirements to ensure the invocation? (Could there be any conflict between the invocation and concurrent builds?)

Could you tell us how you are discovering that it wasn’t invoked? We don’t reliably log for event-triggered functions, so you should be checking the result of the function. What is yours (attempting to) do? Might also be useful to link us in our UI to a build that you think didn’t trigger it so we can examine our logs (which live a lot longer than function logs) to see if it was invoked (silently, perhaps?)

Thanks in advance for your help in troubleshooting!

Good to know. I was checking both the logs and the usage counter in the settings page, and both stayed unchanged despite a deployment. The script essentially purges cache on my CDN, so I could see (as far as I know) that the purge did not occur.
Is there any way to send you a private message? The deploy id is 5d099799ad35bc0008a4639b but I don’t know if this is sufficient data.

Hi there @Edouard, I can confirm that the function triggered for that deploy. What I recommend to help you with more consistent logging is to rename your deploy-succeeded function so it’s not one of our automatic event triggered functions, but instead trigger it using a deploy-succeeded webhook that you add to your sites deploy notifications:

This will get you what you want, but the logs will trigger more reliably this way. Sorry for the trouble!

P.S. You have to rename it because you can’t trigger a named event triggered function manually. :wink: