You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above issue was caused by an incorrect assumption that function.Executor.TryExecuteAsync(...) would throw on host shutdown (primarily because we supplied the host shutdown cancellation token). This is not the case, instead the function invocation will 'complete' in a failed state. This led to durable extension to not retry all these triggered functions (orchestrations and activities in this case) on host shutdown, instead it considered them complete/failed.
Suggestion
I think it would be a better experience for us to differentiate platform exceptions from user exceptions here. User exceptions can continue to be swallowed and exposed in the function results .Exception property. Platform exceptions, including host shutdown OperationCancelledException, can be bubbled up directly. This will give callers an explicit way to essentially 'abort' their invocation in the case of host shutdown or other transient platform issues.
While this does violate the Try* pattern, I believe being able to easily distinguish platform error vs user error is worth the trade-off. This would be a behavior breaking change and need to go into 5.x.
We improve the FunctionResult object to include enough information to differentiate platform from user error. An enumeration property describing the cause (ie Platform / User) may be sufficient. This would not be a breaking change and could go into the current release.
The text was updated successfully, but these errors were encountered:
Related to Azure/azure-functions-durable-extension#2456
Issue
The above issue was caused by an incorrect assumption that
function.Executor.TryExecuteAsync(...)
would throw on host shutdown (primarily because we supplied the host shutdown cancellation token). This is not the case, instead the function invocation will 'complete' in a failed state. This led to durable extension to not retry all these triggered functions (orchestrations and activities in this case) on host shutdown, instead it considered them complete/failed.Suggestion
I think it would be a better experience for us to differentiate platform exceptions from user exceptions here. User exceptions can continue to be swallowed and exposed in the function results
.Exception
property. Platform exceptions, including host shutdownOperationCancelledException
, can be bubbled up directly. This will give callers an explicit way to essentially 'abort' their invocation in the case of host shutdown or other transient platform issues.While this does violate the
Try*
pattern, I believe being able to easily distinguish platform error vs user error is worth the trade-off. This would be a behavior breaking change and need to go into 5.x.This would also help address #8994
Alternative Suggestion
We improve the
FunctionResult
object to include enough information to differentiate platform from user error. An enumeration property describing the cause (iePlatform
/User
) may be sufficient. This would not be a breaking change and could go into the current release.The text was updated successfully, but these errors were encountered: