Commit 4e28a5e
authored
fix: retries optional not set
* fix: set retry defaults and jitter
Fix retry strategy to only apply default error patterns when neither
retryable_errors nor retryable_error_types is specified, matching the
behavior of the JS/TS SDK. Previously, specifying only one filter would
still apply defaults, causing unintended retry behavior.
Also fix critical jitter calculation bug where jitter was being added
to base delay instead of replacing it, effectively doubling delays.
- Change RetryStrategyConfig fields to None defaults
- Apply default patterns only when both filters are None
- Rename compute_jitter to apply_jitter for clarity
- Fix apply_jitter to return final delay not additive amount
- Update test expectations to match corrected jitter behavior
- Add missing math import to waits.py
* fix: pin hatch version
Prevent ruff fmt errors since experimental is on
* feat: cache retry regex1 parent 94b57cc commit 4e28a5e
File tree
6 files changed
+553
-367
lines changed- .github/workflows
- src/aws_durable_execution_sdk_python
- tests
6 files changed
+553
-367
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
467 | 469 | | |
468 | 470 | | |
469 | 471 | | |
470 | | - | |
| 472 | + | |
471 | 473 | | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
475 | 477 | | |
476 | 478 | | |
477 | | - | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
478 | 488 | | |
479 | 489 | | |
480 | | - | |
| 490 | + | |
481 | 491 | | |
482 | | - | |
| 492 | + | |
| 493 | + | |
483 | 494 | | |
| 495 | + | |
484 | 496 | | |
485 | 497 | | |
486 | 498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
78 | | - | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | | - | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
86 | | - | |
87 | | - | |
| 99 | + | |
| 100 | + | |
88 | 101 | | |
89 | 102 | | |
90 | 103 | | |
91 | 104 | | |
92 | 105 | | |
93 | 106 | | |
94 | | - | |
| 107 | + | |
95 | 108 | | |
96 | 109 | | |
97 | 110 | | |
98 | | - | |
99 | | - | |
100 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
101 | 115 | | |
102 | | - | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | | - | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
92 | 92 | | |
93 | | - | |
94 | | - | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments