[refactor]: use an executor class instead of closure#375
Merged
zhongkechen merged 2 commits intomainfrom May 5, 2026
Merged
Conversation
6c6dcb7 to
04814a9
Compare
584c93c to
725d8af
Compare
SilanHe
reviewed
May 5, 2026
SilanHe
approved these changes
May 5, 2026
yaythomas
reviewed
May 5, 2026
| exception=ExecutionError(msg), retryable=True | ||
| ) | ||
| # add a redundant raise to make type checker happy | ||
| raise ExecutionError(msg) |
Contributor
There was a problem hiding this comment.
nervous about this. if _handle_execution_output behaves surprisingly, this ends up becoming a problem.
yaythomas
reviewed
May 5, 2026
yaythomas
reviewed
May 5, 2026
yaythomas
reviewed
May 5, 2026
|
|
||
| def handle_checkpoint_error(error: CheckpointError) -> DurableExecutionInvocationOutput: | ||
| if error.is_retryable(): | ||
| raise error from None # Terminate Lambda immediately and have it be retried |
Contributor
There was a problem hiding this comment.
I think this from None is also a behaviour change.
This one was intentional?
Contributor
Author
There was a problem hiding this comment.
This might be a real concern. From None or bare raise should be used, otherwise the exception will be chained with redundant info.
yaythomas
reviewed
May 5, 2026
| else: | ||
| try: | ||
| logger.debug( | ||
| "durableExecutionArn: %s", event.get("DurableExecutionArn") |
Contributor
There was a problem hiding this comment.
this would log before attempting to parse, so if something goes wrong at least maybe the Arn is in the output. Now it only logs on success?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Useful for #370
Description of changes:
Added
DurableExecutionExecutorclass to wrap the required fields that were previously shared via closure.plugins and more fields will be added to this new class to be shared across methods.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.