Skip to content

Commit 90d867f

Browse files
author
Alex Wang
committed
fix(testing-sdk): remove duplicate store update, use invoke
- remove duplicate store update when validating invocation response - use client.invoke instead of invoke20150331
1 parent afb374e commit 90d867f

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/aws_durable_execution_sdk_python_testing/executor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ def _validate_invocation_response_and_store(
602602
self._complete_workflow(
603603
execution_arn, result=None, error=response.error
604604
)
605-
self._store.save(execution)
606605

607606
case InvocationStatus.SUCCEEDED:
608607
if response.error is not None:
@@ -614,7 +613,6 @@ def _validate_invocation_response_and_store(
614613
self._complete_workflow(
615614
execution_arn, result=response.result, error=None
616615
)
617-
self._store.save(execution)
618616

619617
case InvocationStatus.PENDING:
620618
if not execution.has_pending_operations(execution):

src/aws_durable_execution_sdk_python_testing/invoker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ def invoke(
143143
function_name: str,
144144
input: DurableExecutionInvocationInput,
145145
) -> DurableExecutionInvocationOutput:
146-
# TODO: temporary method name pre-build - switch to `invoke` for final
147146
# TODO: wrap ResourceNotFoundException from lambda in ResourceNotFoundException from this lib
148-
response = self.lambda_client.invoke20150331(
147+
response = self.lambda_client.invoke(
149148
FunctionName=function_name,
150149
InvocationType="RequestResponse", # Synchronous invocation
151150
Payload=json.dumps(input.to_dict(), default=str),

0 commit comments

Comments
 (0)