sam-goodwin / eventual

Build scalable and durable micro-services with APIs, Messaging and Workflows
https://docs.eventual.ai
MIT License
174 stars 4 forks source link

Workflow Properties should be persisted and reloaded from history #416

Open thantos opened 1 year ago

thantos commented 1 year ago

There are some dynamic properties which can be read by the user from within a workflow. For example, the BucketPhysicaName or the current Date at the time of execution.

If those values change between workflow runs, there an or should be a determinism issue.

We already handle Date in a special way, where the value is always retrieved from the WorkflowRunStarted event.

We should extend this support to other values than should be readable, but can change, like the serviceUrl, serviceName, resource physical names, etc.

The recent refactor: https://github.com/functionless/eventual/pull/415 already provides a hookable and dynamic system for retrieving the values (Properties).

Note: this change would also let replay run without any of the Properties because they'd all be loaded dynamically from history.