Merged
Conversation
9ae7449 to
109aa05
Compare
bchampp
approved these changes
Oct 24, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the exception hierarchy to introduce two distinct error types: ExecutionError for non-retriable errors that return FAILED status, and InvocationError for retriable errors that trigger Lambda retries. This aligns callback waiting behavior with the specification: callbacks that terminate without a result raise an error, successful terminations return a value, and pending callbacks suspend execution.
Key changes:
- Replaced
FatalErrorwithExecutionErrorandInvocationErrorbase classes - Introduced
UnrecoverableErrorbase class withTerminationReasonenum - Updated callback result handling to align with spec for terminated vs pending operations
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/aws_durable_execution_sdk_python/exceptions.py |
Introduces new exception hierarchy with ExecutionError, InvocationError, UnrecoverableError, and TerminationReason enum |
src/aws_durable_execution_sdk_python/execution.py |
Updates error handling to differentiate between retriable (InvocationError) and non-retriable (ExecutionError) failures |
src/aws_durable_execution_sdk_python/context.py |
Aligns callback result handling with spec: raises CallbackError for missing operations and suspends for pending callbacks |
src/aws_durable_execution_sdk_python/operation/callback.py |
Replaces FatalError with CallbackError for missing callback details |
src/aws_durable_execution_sdk_python/operation/child.py |
Updates exception handling to check for InvocationError instead of FatalError |
src/aws_durable_execution_sdk_python/operation/step.py |
Replaces FatalError with ExecutionError for non-retriable failures |
src/aws_durable_execution_sdk_python/operation/invoke.py |
Replaces FatalError with ExecutionError for unreachable code paths |
src/aws_durable_execution_sdk_python/serdes.py |
Updates serialization/deserialization errors to use ExecutionError |
src/aws_durable_execution_sdk_python/state.py |
Adds is_cancelled() method to check operation status |
tests/ |
Updates test files to use new exception types and verify correct behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Author
|
Last commit deals with merge conflicts ✌️ |
- Introduce `ExecutionError` and `InvocationError` for non-retriable and retriable errors respectfully. - align callback waiting behaviour according to spec: - terminated without resuklt will raise an error - terminated and successful will return appropriate value - anything else will suspend execution
This pull request was closed.
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.
retriable errors respectfully.
Issue #, if available:
fixes #45
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.