Merged
Conversation
Changes: - CheckpointErrors now inspect service metadata and identify whether they should be invocation errors or execution errors - Added tests to ensure we match reference - Added tests to ensure we test all in execution.py
ghost
commented
Nov 8, 2025
| isinstance(bg_error.source_exception, CheckpointError) | ||
| and bg_error.source_exception.should_be_retried() | ||
| ): | ||
| raise bg_error.source_exception from None # Terminate Lambda immediately and have it be retried |
Author
There was a problem hiding this comment.
We use from None to indicate that the error didn't originate from handling the exception in the first place, but instead is a continuation.
ghost
commented
Nov 8, 2025
Comment on lines
+349
to
+350
| if e.should_be_retried(): | ||
| raise # Terminate Lambda immediately and have it be retried |
Author
There was a problem hiding this comment.
Here we don't do from since this is an unwrapped CheckpointError.
yaythomas
requested changes
Nov 8, 2025
| self.step_id = step_id | ||
|
|
||
|
|
||
| CheckpointErrorKind = Literal["Execution", "Invocation"] |
| error_kind = "Execution" | ||
| return CheckpointError(str(exception), error_kind, error, metadata) | ||
|
|
||
| def should_be_retried(self): |
| def __init__( | ||
| self, | ||
| message: str, | ||
| error_kind: CheckpointErrorKind, |
Contributor
There was a problem hiding this comment.
.category = ErrorCategory.INVOCATION
1c513c0 to
1df00f2
Compare
yaythomas
approved these changes
Nov 8, 2025
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.
Changes:
they should be invocation errors or execution errors
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.