Description
The durable-functions emulator now mints DurableExecutionArn values in the form <uuid>/<invocation-id> (introduced in aws-durable-execution-sdk-python-testing#216). The new shape is faithfully echoed in sam local invoke output:
ARN: 9a1bc86c-40b9-4688-86b4-d7ecaca41579/2a8bc667-bc0b-4b5e-8c78-26db9c5b4e33
The integration helper DurableIntegBase.assert_invoke_output parses this line with a regex that does not include /:
https://github.com/aws/aws-sam-cli/blob/develop/tests/integration/durable_integ_base.py#L155
arn_match = re.search(r"ARN:\s+([a-f0-9-]+)", stdout_str)
So the captured group truncates at the first /, leaving only the leading UUID. Any subsequent test step that invokes the emulator with that truncated value (sam local execution history|stop|get) gets a 404, and the test fails with AssertionError: 1 != 0.
Failing tests in CI
Reproducible on develop in Integration Tests #496 / local-invoke:
tests/integration/local/invoke/test_invoke_durable.py::TestInvokeDurable::test_local_invoke_durable_function_HelloWorld
…test_local_invoke_durable_function_MapOperations
…test_local_invoke_durable_function_NamedStep
…test_local_invoke_durable_function_NamedWait
…test_local_invoke_durable_function_timeout
…test_local_invoke_durable_function_wait_for_callback_0_with_result
…test_local_invoke_durable_function_wait_for_callback_1_without_result
tests/integration/local/execution/test_execution.py::TestLocalExecution::test_execution_stop_already_completed
Captured stderr from the HelloWorld case shows the truncation directly:
Error: An error occurred (404) when calling the GetDurableExecutionHistory operation:
Execution 9a1bc86c-40b9-4688-86b4-d7ecaca41579 not found
Fix
Broaden the capture group to any non-whitespace token so it accepts the new <uuid>/<invocation-id> form (and any future ARN shape):
arn_match = re.search(r"ARN:\s+(\S+)", stdout_str)
Backwards-compatible — old UUID-only ARNs still match.
Description
The durable-functions emulator now mints
DurableExecutionArnvalues in the form<uuid>/<invocation-id>(introduced in aws-durable-execution-sdk-python-testing#216). The new shape is faithfully echoed insam local invokeoutput:The integration helper
DurableIntegBase.assert_invoke_outputparses this line with a regex that does not include/:https://github.com/aws/aws-sam-cli/blob/develop/tests/integration/durable_integ_base.py#L155
So the captured group truncates at the first
/, leaving only the leading UUID. Any subsequent test step that invokes the emulator with that truncated value (sam local execution history|stop|get) gets a 404, and the test fails withAssertionError: 1 != 0.Failing tests in CI
Reproducible on
developin Integration Tests #496 /local-invoke:tests/integration/local/invoke/test_invoke_durable.py::TestInvokeDurable::test_local_invoke_durable_function_HelloWorld…test_local_invoke_durable_function_MapOperations…test_local_invoke_durable_function_NamedStep…test_local_invoke_durable_function_NamedWait…test_local_invoke_durable_function_timeout…test_local_invoke_durable_function_wait_for_callback_0_with_result…test_local_invoke_durable_function_wait_for_callback_1_without_resulttests/integration/local/execution/test_execution.py::TestLocalExecution::test_execution_stop_already_completedCaptured stderr from the HelloWorld case shows the truncation directly:
Fix
Broaden the capture group to any non-whitespace token so it accepts the new
<uuid>/<invocation-id>form (and any future ARN shape):Backwards-compatible — old UUID-only ARNs still match.