feat(sdk): add replay-aware logging to suppress logs during execution replay#88
Closed
feat(sdk): add replay-aware logging to suppress logs during execution replay#88
Conversation
- Track visited operations in DurableContext logger - Suppress default logger output when replaying existing operations - Add ReplayAwareLogger class for custom replay behavior - Provide is_replay() method to check current execution state - Ignore EXECUTION type operations in replay detection
ghost
reviewed
Oct 23, 2025
Comment on lines
+104
to
+111
| # Check if there are any operations in the execution state that we haven't visited | ||
| # Only consider operations that are not EXECUTION type (which are system operations) | ||
| for operation_id, operation in self._execution_state.operations.items(): | ||
| # Skip EXECUTION operations as they are system operations, not user operations | ||
| if operation.operation_type == OperationType.EXECUTION: | ||
| continue | ||
| if operation_id not in self._visited_operations: | ||
| return True |
There was a problem hiding this comment.
We can be in replay and still not visit every operation, e.g. we have a parallel with 5 child executions that has completed due to minSuccessful == 1, then on replay, the optimized replay will only visit the completed thread.
|
I am not sure about this implementation, we can visit a state twice, and one time the state is STARTED and the next is FAILED, if we only consider the operation ID, then we are missing out on transitions. |
Contributor
|
Should we close this PR @PartiallyUntyped @yaythomas ? |
|
Yeah let's do that. |
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.
Issue #, if available:
closes #50
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.