Repository navigation
Conversation
…al service Signed-off-by: Ym <[email protected]>
This branch was successfully deployed
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.
Hello, I picked this issue up and here is what I came up with.
Fixes #859.
Description of changes
In the testing package,
ReplayChildrenis now recorded and projected the way the issue describes:OperationProcessor._create_context_detailsrecords true only when a SUCCEED or FAIL update explicitly asks for it. Any other closing case records false, and START never retains it.project_operation_dictinmodel.pyapplies the testing-service projection to an already serialized operation: a STARTED context carries noReplayChildren, a completed context carries an explicit boolean. TheOperationit is given is not changed.invoker.py,_invocation_input_payload),GetDurableExecutionStateResponse.to_dictandCheckpointUpdatedExecutionState.to_dict. CoreOperationconversion and its generic serialization are untouched.Design
Design note (rule 3): not needed, the issue is the design and this is a local-service projection, not a new option or public API.
Simpler options considered (rule 2): one helper applied at the three serialization points, instead of changing core serialization (which the issue rules out) or adding a flag.
Root cause (rule 5): the processor copied
context_options.replay_childrenon every action, including START, and core serialization drops a false value, so a completed context could not state an explicit false.Net change: about 45 source lines in three files, no public API members added (
project_operation_dictand_invocation_input_payloadare internal helpers).Assumptions
The wire behaviour (field omitted while STARTED, explicit boolean when completed) is taken from the issue text and PR #795 and has not been checked against deployed AWS Lambda. That part is unverified.
Decisions not covered by the issue or the design note
zip(..., strict=True)), so a mismatch fails loudly instead of skipping a projection.Verification
tests/replay_children_wire_test.py(13 tests): the closing matrix for SUCCEED and FAIL with options omitted, empty, false and true; START not retaining true; STARTED omission and completed boolean on the state response, checkpoint response and invocation payload; non-context operations unchanged.test_start_does_not_retain_replay_childrenfails; with it restored, all 13 pass.aws-durable-execution-sdk-python-testingsuite: 1899 passed.ruff format --checkis clean for the changed files.ruff checkreports one existingInvocationStatusredefinition inrunner.py, which this change does not touch.Not run
hatchenvironments, type checking, the core and examples packages, a public child-context workflow test, memory and filesystem store round-trips (the new tests exercise the serializers and processor directly), and any check against a deployed service.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.