Replies: 3 comments 4 replies
-
Allow orchestrations to return and exit into a runtime status of |
Beta Was this translation helpful? Give feedback.
-
Consider revising how Example 1 Don't throw an Instead give me a response Tuple Why?
Example 2 Don't throw an Instead use the response Tuple as defined above. Why?
I think with both of the above examples, my way of thinking is now more aligned to the concept of signalling (Durable Entities 1-way signalling is a perfect example) and I see the |
Beta Was this translation helpful? Give feedback.
-
Another suggestion for a breaking change: remove the This 'exception wrapping' behavior does not provide any value IMO, using an inner exception just obscures the root cause and complicates the exception handling in the orchestrator. For example, it can mean that we don't see the root cause immediately when only the first line of the exception is printed in our tools or in the portal. Seeing the root cause immediately can be a big time saver. There is one situation in which the Also, removing this wrapper would make the behavior consistent with failing entity calls (which already do not use this wrapper). |
Beta Was this translation helpful? Give feedback.
-
Opening a discussion to propose some breaking API changes that I'd like to see in a future major version of Durable Functions. I decided to make this a discussion in hopes that it would be easier to find and allow folks to chime in if they have other ideas or thoughts.
(NOTE: This is not an announcement of any changes - just keeping track of some changes I'd like to see someday, if we decide it makes sense. Also, it's entirely possible that we could make some of these changes in a non-breaking way.)
Interfaces vs. abstract classes
In Durable Functions v2 we moved the "context" objects from interfaces to abstract classes. I regret this move because now every interface change is a breaking change for test code. The C# team did announce support for default interface implementations in C# 8, but they can't be used in .NET Standard 2.0. I'd like us to reconsider a move back to abstract base classes.
Better instance history purge APIs
Related to Gracefully handling timeouts on consumption plan while purging orchestrations #882, instance history purge APIs should be more consistent with instance query APIs, and should take a cancellation token as a parameter.
DurabilityProvider.PurgeHistoryByFilters() should return
PurgeHistoryResult
instead ofint
This is mainly for API consistency. The DurabilityProivder.PurgeInstanceHistoryByInstanceId() method already returns
PurgeHistoryResult
.IDurableOrchestrationClient.PurgeInstanceHistoryAsync should take a list of
OrchestrationRuntimeStatus
instead ofDurableTask.Core.OrchestrationStatus
Durable Functions APIs generally are not supposed to expose DurableTask.Core.* APIs directly. The fact that we leak this type through is an inconsistency in the current API design.
IDurableOrchestrationContext.CreateTimer to remove
state
parameter:This parameter serves no useful purpose, AFAICT.
Consider removing exceptions from client operations that cannot be raised deterministically
APIs like
RaiseEventAsync
will throw an exception if an orchestration is in a non-running state. However, this can be problematic since a lack of an exception does not mean the target orchestration received the event. For example, the status of the orchestration seen by the client at send-time might be Running but it could change to Completed before the orchestration actually receives it. An alternative design would be to never throw an exception. Users would need to rely on server side logs to know whether an event was received.(More to come as I continue to remember some of the changes I'd like to make - I can also update this list based on recommendations from the community)
Beta Was this translation helpful? Give feedback.
All reactions