Skip to content

Conversation

davidmrdavid
Copy link
Collaborator

@davidmrdavid davidmrdavid commented Sep 28, 2021

This PR allows entity timeouts to be try-catched within orchestrators.

EDIT:

When an entity operation runs for too long, it runs the risk of being cancelled by the Functions Host due to it "timing out", that is, exceeding the maximum allowed execution time for a Function invocation. When this occurs, we consider the entity to have thrown an exception ( a timeout exception) and, as such, we expect to be able to try-catch it in the orchestrator. Currently, this doesn't happen.

To enable this scenario, there are changes required in the extension and in the SDK. Sebastian has been working on the extension changes in this branch and, using that branch's changes, this PR implements the SDK-level changes that are leftover.

In particular, during a time-out, the HistoryEvent corresponding to this exception doesn't follow the serialization rules that normally govern Entity execution and therefore they require an extra step (to serialize the exception one more time) before they can be parsed by the SDK. This PR does just that.

@davidmrdavid davidmrdavid marked this pull request as ready for review November 4, 2021 17:50
@cgillum
Copy link
Member

cgillum commented Nov 5, 2021

@davidmrdavid can you add a bit more contextual information to this PR? I'm interested in understanding what an entity timeout is and how this PR improves the experience of working with entities.

@davidmrdavid
Copy link
Collaborator Author

Thanks for the heads up @cgillum, I should have provided that context in the first place but was a little rushed. I have updated the original post to include that context.

@davidmrdavid davidmrdavid merged commit c392288 into dev Nov 9, 2021
@davidmrdavid davidmrdavid deleted the dajusto/timeouts-entity branch November 9, 2021 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants