temporalio / features

Behavior and history compatibility testing for Temporal SDKs
13 stars 16 forks source link

[Feature Request] Configurable workflow failure exception types #322

Open cretz opened 1 year ago

cretz commented 1 year ago

Describe the solution you'd like

We need to let users choose what fails the workflow vs what just fails the task today. Go and Java already have some form of this. To do:

This can change at implementation time, this is just a guide.

cretz commented 5 months ago

Discussion is occurring on potentially changing default from task fail to workflow fail, so we probably need to make that option a simple on/off bool in addition to the configurable exception types (instead of just using Exception type as the way to opt-in to all).

Also, we may need to make sure that deadlocks aren't allowed to fail workflows and therefore aren't subject to this. May need more discussion.

cretz commented 5 months ago

Note for implementers on core-based SDKs, it may be reasonable to have a non-determinism exception that's only used in the replayer, but that is the "marker" type for telling core that you want non-determinism failures as wf failures instead of task failures.

cretz commented 5 months ago

Also more note for SDK implementers: