simpleflow
simpleflow copied to clipboard
Improve swf.format when message is too long
@ampelmann noticed that with recent changes on swf.format module, the code raises but that may leave tasks running while in fact they are not. This is especially true if we don't have a heartbeat timeout on the task, it can last for hours while in fact, the RespondActivityTaskCompleted/Failed has failed.
Proposed changes:
- we could replace the message with a default one, like "ERROR: field too long check your logs"
- for the "result" field, I would NOT have a JSON parseable message, since we take the risk of propagating silent errors down the road ; maybe a RespondActivityTaskCompleted could be turned into a RespondActivityTaskFailed with the message above
- for the "input" field, the simplest behaviour would be to fail the workflow directly ; it's not nice for optional ones but we're going to scratch our head against the wall otherwise
What do you think @ybastide @ampelmann ?
"check your logs": Ha! 🙂 Yes, seems reasonable