@@ -33,6 +33,7 @@ def test_execution_init():
3333 execution_name = "test-execution" ,
3434 execution_timeout_seconds = 300 ,
3535 execution_retention_period_days = 7 ,
36+ invocation_id = "test-invocation-id" ,
3637 )
3738 operations = []
3839
@@ -61,11 +62,14 @@ def test_execution_new(mock_uuid4):
6162 execution_name = "test-execution" ,
6263 execution_timeout_seconds = 300 ,
6364 execution_retention_period_days = 7 ,
65+ invocation_id = "test-invocation-id-1234" ,
6466 )
6567
6668 execution = Execution .new (start_input )
6769
68- assert execution .durable_execution_arn == str (mock_uuid )
70+ assert (
71+ execution .durable_execution_arn == str (mock_uuid ) + "/test-invocation-id-1234"
72+ )
6973 assert execution .start_input == start_input
7074 assert execution .operations == []
7175
@@ -130,6 +134,7 @@ def test_get_operation_execution_started_not_started():
130134 execution_name = "test-execution" ,
131135 execution_timeout_seconds = 300 ,
132136 execution_retention_period_days = 7 ,
137+ invocation_id = "test-invocation-id" ,
133138 )
134139 execution = Execution ("test-arn" , start_input , [])
135140
@@ -146,6 +151,7 @@ def test_get_new_checkpoint_token():
146151 execution_name = "test-execution" ,
147152 execution_timeout_seconds = 300 ,
148153 execution_retention_period_days = 7 ,
154+ invocation_id = "invocation-id" ,
149155 )
150156 execution = Execution ("test-arn" , start_input , [])
151157
@@ -167,6 +173,7 @@ def test_get_navigable_operations():
167173 execution_name = "test-execution" ,
168174 execution_timeout_seconds = 300 ,
169175 execution_retention_period_days = 7 ,
176+ invocation_id = "test-invocation-id" ,
170177 )
171178 operations = [
172179 Operation (
@@ -194,6 +201,7 @@ def test_get_assertable_operations():
194201 execution_name = "test-execution" ,
195202 execution_timeout_seconds = 300 ,
196203 execution_retention_period_days = 7 ,
204+ invocation_id = "test-invocation-id" ,
197205 )
198206 execution_op = Operation (
199207 operation_id = "exec-op" ,
@@ -229,6 +237,7 @@ def test_has_pending_operations_with_pending_step():
229237 execution_name = "test-execution" ,
230238 execution_timeout_seconds = 300 ,
231239 execution_retention_period_days = 7 ,
240+ invocation_id = "test-invocation-id" ,
232241 )
233242 operations = [
234243 Operation (
@@ -256,6 +265,7 @@ def test_has_pending_operations_with_started_wait():
256265 execution_name = "test-execution" ,
257266 execution_timeout_seconds = 300 ,
258267 execution_retention_period_days = 7 ,
268+ invocation_id = "test-invocation-id" ,
259269 )
260270 operations = [
261271 Operation (
@@ -283,6 +293,7 @@ def test_has_pending_operations_with_started_callback():
283293 execution_name = "test-execution" ,
284294 execution_timeout_seconds = 300 ,
285295 execution_retention_period_days = 7 ,
296+ invocation_id = "test-invocation-id" ,
286297 )
287298 operations = [
288299 Operation (
@@ -310,6 +321,7 @@ def test_has_pending_operations_with_started_invoke():
310321 execution_name = "test-execution" ,
311322 execution_timeout_seconds = 300 ,
312323 execution_retention_period_days = 7 ,
324+ invocation_id = "test-invocation-id" ,
313325 )
314326 operations = [
315327 Operation (
@@ -337,6 +349,7 @@ def test_has_pending_operations_no_pending():
337349 execution_name = "test-execution" ,
338350 execution_timeout_seconds = 300 ,
339351 execution_retention_period_days = 7 ,
352+ invocation_id = "test-invocation-id" ,
340353 )
341354 operations = [
342355 Operation (
@@ -364,6 +377,7 @@ def test_complete_success_with_string_result():
364377 execution_name = "test-execution" ,
365378 execution_timeout_seconds = 300 ,
366379 execution_retention_period_days = 7 ,
380+ invocation_id = "test-invocation-id" ,
367381 )
368382 execution = Execution ("test-arn" , start_input , [Mock ()])
369383
@@ -383,6 +397,7 @@ def test_complete_success_with_none_result():
383397 execution_name = "test-execution" ,
384398 execution_timeout_seconds = 300 ,
385399 execution_retention_period_days = 7 ,
400+ invocation_id = "test-invocation-id" ,
386401 )
387402 execution = Execution ("test-arn" , start_input , [Mock ()])
388403
@@ -402,6 +417,7 @@ def test_complete_fail():
402417 execution_name = "test-execution" ,
403418 execution_timeout_seconds = 300 ,
404419 execution_retention_period_days = 7 ,
420+ invocation_id = "test-invocation-id" ,
405421 )
406422 execution = Execution ("test-arn" , start_input , [Mock ()])
407423 error = ErrorObject .from_message ("Test error message" )
@@ -422,6 +438,7 @@ def test_find_operation_exists():
422438 execution_name = "test-execution" ,
423439 execution_timeout_seconds = 300 ,
424440 execution_retention_period_days = 7 ,
441+ invocation_id = "test-invocation-id" ,
425442 )
426443 operation = Operation (
427444 operation_id = "test-op-id" ,
@@ -448,6 +465,7 @@ def test_find_operation_not_exists():
448465 execution_name = "test-execution" ,
449466 execution_timeout_seconds = 300 ,
450467 execution_retention_period_days = 7 ,
468+ invocation_id = "test-invocation-id" ,
451469 )
452470 execution = Execution ("test-arn" , start_input , [])
453471
@@ -470,6 +488,7 @@ def test_complete_wait_success(mock_datetime):
470488 execution_name = "test-execution" ,
471489 execution_timeout_seconds = 300 ,
472490 execution_retention_period_days = 7 ,
491+ invocation_id = "test-invocation-id" ,
473492 )
474493 operation = Operation (
475494 operation_id = "wait-op-id" ,
@@ -498,6 +517,7 @@ def test_complete_wait_wrong_status():
498517 execution_name = "test-execution" ,
499518 execution_timeout_seconds = 300 ,
500519 execution_retention_period_days = 7 ,
520+ invocation_id = "test-invocation-id" ,
501521 )
502522 operation = Operation (
503523 operation_id = "wait-op-id" ,
@@ -524,6 +544,7 @@ def test_complete_wait_wrong_type():
524544 execution_name = "test-execution" ,
525545 execution_timeout_seconds = 300 ,
526546 execution_retention_period_days = 7 ,
547+ invocation_id = "test-invocation-id" ,
527548 )
528549 operation = Operation (
529550 operation_id = "step-op-id" ,
@@ -548,6 +569,7 @@ def test_complete_retry_success():
548569 execution_name = "test-execution" ,
549570 execution_timeout_seconds = 300 ,
550571 execution_retention_period_days = 7 ,
572+ invocation_id = "test-invocation-id" ,
551573 )
552574 step_details = StepDetails (
553575 next_attempt_timestamp = str (datetime .now (timezone .utc )),
@@ -581,6 +603,7 @@ def test_complete_retry_no_step_details():
581603 execution_name = "test-execution" ,
582604 execution_timeout_seconds = 300 ,
583605 execution_retention_period_days = 7 ,
606+ invocation_id = "test-invocation-id" ,
584607 )
585608 operation = Operation (
586609 operation_id = "step-op-id" ,
@@ -608,6 +631,7 @@ def test_complete_retry_wrong_status():
608631 execution_name = "test-execution" ,
609632 execution_timeout_seconds = 300 ,
610633 execution_retention_period_days = 7 ,
634+ invocation_id = "test-invocation-id" ,
611635 )
612636 operation = Operation (
613637 operation_id = "step-op-id" ,
@@ -634,6 +658,7 @@ def test_complete_retry_wrong_type():
634658 execution_name = "test-execution" ,
635659 execution_timeout_seconds = 300 ,
636660 execution_retention_period_days = 7 ,
661+ invocation_id = "test-invocation-id" ,
637662 )
638663 operation = Operation (
639664 operation_id = "wait-op-id" ,
@@ -658,6 +683,7 @@ def test_status_running():
658683 execution_name = "test-execution" ,
659684 execution_timeout_seconds = 300 ,
660685 execution_retention_period_days = 7 ,
686+ invocation_id = "test-invocation-id" ,
661687 )
662688 execution = Execution ("test-arn" , start_input , [])
663689
@@ -673,6 +699,7 @@ def test_status_succeeded():
673699 execution_name = "test-execution" ,
674700 execution_timeout_seconds = 300 ,
675701 execution_retention_period_days = 7 ,
702+ invocation_id = "test-invocation-id" ,
676703 )
677704 execution = Execution ("test-arn" , start_input , [Mock ()])
678705 execution .complete_success ("success result" )
@@ -689,6 +716,7 @@ def test_status_failed():
689716 execution_name = "test-execution" ,
690717 execution_timeout_seconds = 300 ,
691718 execution_retention_period_days = 7 ,
719+ invocation_id = "test-invocation-id" ,
692720 )
693721 execution = Execution ("test-arn" , start_input , [Mock ()])
694722 error = ErrorObject .from_message ("Test error" )
@@ -706,6 +734,7 @@ def test_status_timed_out():
706734 execution_name = "test-execution" ,
707735 execution_timeout_seconds = 300 ,
708736 execution_retention_period_days = 7 ,
737+ invocation_id = "invocation-id" ,
709738 )
710739 execution = Execution ("test-arn" , start_input , [Mock ()])
711740 error = ErrorObject (
@@ -725,6 +754,7 @@ def test_status_stopped():
725754 execution_name = "test-execution" ,
726755 execution_timeout_seconds = 300 ,
727756 execution_retention_period_days = 7 ,
757+ invocation_id = "invocation-id" ,
728758 )
729759 execution = Execution ("test-arn" , start_input , [Mock ()])
730760 error = ErrorObject (
@@ -744,6 +774,7 @@ def test_status_no_result():
744774 execution_name = "test-execution" ,
745775 execution_timeout_seconds = 300 ,
746776 execution_retention_period_days = 7 ,
777+ invocation_id = "invocation-id" ,
747778 )
748779 execution = Execution ("test-arn" , start_input , [])
749780 execution .is_complete = True
0 commit comments