Allow granular units for timeouts in workflow intents and workflows.
The workflow intents today take integer values for timeouts, which are implicitly in nanoseconds. This is cumbersome and results in large timeout values.
We need to allow a time unit for each timeout. In general, different timeouts will have different units: heartbeat timeouts can be in milliseconds, whereas workflow timeouts could be in days. Using the same units for all timeouts can result in large unreadable numbers.
Proposal: Use s for seconds, ms for milliseconds, m for minutes, h for hours and d for days. Not sure if we ever need ‘us’ for microseconds, or if Temporal even supports that.
NOTE:
- The workflowmgr need only pass these values to the workflow client and need not parse/use the timeout values itself. (The JSON schema it uses to validate the intent must allow for such units, but that's about it.)
- Only the workflow client and the worker need to parse/apply the timeout values. That is why the issue belongs here rather than in emco-base repo.
Edited by Nadathur Sundar