-
Notifications
You must be signed in to change notification settings - Fork 19
Description
When a user resets an activity the activity should be restarted.
- They may have passed
--reset-heartbeatsin which case heartbeat details should be cleared - If they didn't pass it, they may nonetheless want the code to start from the beginning of the method (perhaps they've deployed a code fix which improves efficiency or fixes a memory leak, or have non-deterministic code that has randomly gotten into a bad state.)
The server will inform the SDK that heartbeats were reset so that it can throw an error in the user's Activity.
Requirements:
-
Users shouldn't have to predict that resets will happen when writing their activity code
-
Code should by default do the right thing and exit and restart, provided they haven't written an exception handler.
-
Should work as much like pause and cancel as possible for consistency.
-
Users should be able to write a simple exception handler that cleans up after any interruption, including cancellation, pausing, and reset.
-
Users should also be able to differentiate. For example, after cancel, cleanup would be permanent, but after pause/reset, it would be temporary, which may mean the user would want to take different actions.
-
TypeScript [typescript] SDK support for activity reset sdk-typescript#1693
-
Python [python] SDK support for activity reset sdk-python#847