Assigned
Status Update
Comments
ar...@google.com <ar...@google.com> #2
Hello,
Thanks for reporting the issue. As mentioned in the documentation [1] the number of times your function is going to be invoked on an event depends on the type of functions you are using. For the background functions, it will be at least once as it may need to retry in case of an error and to help deliver desired result by en event. Therefore, what you are experiencing at the moment is considered as intended behavior for the Cloud Functions.
However, I’ve filed an internal feature request to the Cloud Functions engineering team in order to consider implementing it. Please note that we cannot provide an ETA on this request or guarantee its implementation.
Any future communication regarding this feature request will be posted here.
[1]https://cloud.google.com/functions/docs/concepts/exec#execution_guarantees
Thanks for reporting the issue. As mentioned in the documentation [1] the number of times your function is going to be invoked on an event depends on the type of functions you are using. For the background functions, it will be at least once as it may need to retry in case of an error and to help deliver desired result by en event. Therefore, what you are experiencing at the moment is considered as intended behavior for the Cloud Functions.
However, I’ve filed an internal feature request to the Cloud Functions engineering team in order to consider implementing it. Please note that we cannot provide an ETA on this request or guarantee its implementation.
Any future communication regarding this feature request will be posted here.
[1]
ar...@google.com <ar...@google.com>
ya...@gmail.com <ya...@gmail.com> #3
I understand GCF retries if there is an uncaught error and the 'retry on failure' is on, but in our case there was no error and the function ran twice **within the same execution_id**. We consider that a bug.
Description
While the SLA guarantees execution, it does not assure a function be run only once for each event - see note here
In our case, this means GCF is not ready for mission critical functions as output can be generated twice e.g. email, text, API to endpoint that records a transaction.
So beware, one event, like file creation in GCS for us, could seamlessly end up producing duplicates.
This can be spotted in logging i.e. multiple "Function execution started" entries within same execution_id.
Not to name it but we never experienced that with our existing serverless functions with another provider. Will reconsider migration once GCF is more reliable.
Please "star" the issue (no '+1') if a guarantee of a single run per event is important to you... This will help with the priority.