generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Expected Behavior
When creating a Checkpoint with an empty updates array, such that
CheckpointDurableExecutionRequest(DurableExecutionArn=<<my-arn>>, CheckpointToken=<<my-token>>, Updates=[])
The response should contain NewExecutionState, where
If NO new events occurred:
- CheckpointToken: New token with incremented sequence
- NewExecutionState.Operations: Empty array []
- NewExecutionState.NextMarker: null
If new events occurred (timer fired, etc.):
- CheckpointToken: New token with incremented sequence
- NewExecutionState.Operations: Array with those operations
- NewExecutionState.NextMarker: null
The response CAN return an empty NewExecutionState.Operations array when there are no updates AND no new backend events.
The response should ALWAYS includes NewExecutionState - it never omits it.
Actual Behavior
The local-runner has a short-circuit only to pass back the updated checkpoint token and set new_execution_state=None if updates are empty. This is wrong.
if updates:
checkpoint_output = self._checkpoint_processor.process_checkpoint(
checkpoint_token=checkpoint_token,
updates=updates,
client_token=client_token,
)
new_execution_state = None
if checkpoint_output.new_execution_state:
new_execution_state = CheckpointUpdatedExecutionState(
operations=checkpoint_output.new_execution_state.operations,
next_marker=checkpoint_output.new_execution_state.next_marker,
)
return CheckpointDurableExecutionResponse(
checkpoint_token=checkpoint_output.checkpoint_token,
new_execution_state=new_execution_state,
)
# Save execution state after generating new token
new_checkpoint_token = execution.get_new_checkpoint_token()
self._store.update(execution)
return CheckpointDurableExecutionResponse(
checkpoint_token=new_checkpoint_token,
new_execution_state=None,
)
Steps to Reproduce
Create empty checkpoint call
SDK Version
1
Python Version
3.13
Is this a regression?
No
Last Working Version
No response
Additional Context
No response
phipag
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working