function-sdk-go icon indicating copy to clipboard operation
function-sdk-go copied to clipboard

Handle context timeouts

Open negz opened this issue 1 year ago • 0 comments

What problem are you facing?

I think gRPC will propagate any deadline set by the client to the context.Context our RunFunction method is passed. It's unclear to me whether we have to check manually whether the deadline was exceeded before we run the Function, or whether gRPC will take care of that for us.

https://grpc.io/docs/what-is-grpc/core-concepts/#deadlines

How could Crossplane help solve your problem?

Determine whether we need to be concerned with cancelled deadlines, and if so perhaps add a RunFunction wrapper that handles them (i.e. by avoiding doing work we don't need to do).

negz avatar Sep 14 '23 21:09 negz