Skip to content

Update Orchestration Ouput Return error #493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 30, 2024
Merged

Update Orchestration Ouput Return error #493

merged 4 commits into from
Apr 30, 2024

Conversation

nytian
Copy link
Contributor

@nytian nytian commented Apr 16, 2024

Fix issue #428

If the orchestrator output includes any type that cannot be serialized into JSON, it will trigger a non-deterministic error. This occurs because the orchestration state must be serialized before it is sent to the durable extension. If there is a serialization issue, the extension cannot replay correctly from this corrupted state, thus treating the situation as non-deterministic. The fix in this PR is to verify whether the orchestration output is serializable. If it is not, an exception will be thrown to indicate that this type of return is not accepted in durable Python.

Noting E2E test,

image

Orchestrator return includes a exception object.

Former return:
image

Return with changes in this PR:
image

@nytian nytian marked this pull request as ready for review April 17, 2024 22:25
@nytian nytian requested a review from davidmrdavid as a code owner April 17, 2024 22:25
@nytian
Copy link
Contributor Author

nytian commented Apr 17, 2024

I didn't add a test because the wrong error is returned from the durable extension level, not durable python repo. So I am not sure how to do a proper unit test. But I did the E2E test, and the error message is correct.

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved conditional on the self.output if statement checking specifically for None.

Thanks so much for fixing this!

@nytian nytian merged commit 3f0e168 into dev Apr 30, 2024
2 checks passed
@davidmrdavid davidmrdavid deleted the nytian/error_return branch April 30, 2024 20:22
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