Commit 197a805
committed
refactor(channels/webhook): address review feedback on retry logic
Post-review cleanup on dd93422:
- Drop dead `last_err` state and replace unreachable tail `bail!` with
`unreachable!` β the loop always exits via return/bail on the final
attempt, so the trailing error was never reached.
- Expand comment above the 429/503 Retry-After branch to explain why 429
appears twice: once here (server-supplied delay) and once in the
fallback exponential-backoff branch when no Retry-After header was sent.
- Note in `compute_backoff` doc that the `retry_max_delay_ms` cap is
approximate β Β±25% jitter is applied after capping.
- Add `send_honors_retry_after_on_503` wiremock test mirroring the 429
case, closing a gap where only 429+Retry-After was covered.
- Add schema tests for the 3 new `WebhookConfig` retry fields:
`webhook_config_retry_fields_default_to_none` and
`webhook_config_retry_fields_roundtrip` (JSON + TOML).1 parent 174bd01 commit 197a805
2 files changed
Lines changed: 86 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
| 87 | + | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | 210 | | |
212 | 211 | | |
213 | 212 | | |
| |||
226 | 225 | | |
227 | 226 | | |
228 | 227 | | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
| 228 | + | |
234 | 229 | | |
235 | 230 | | |
236 | 231 | | |
| |||
402 | 397 | | |
403 | 398 | | |
404 | 399 | | |
405 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
406 | 403 | | |
407 | 404 | | |
408 | 405 | | |
| |||
787 | 784 | | |
788 | 785 | | |
789 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
790 | 830 | | |
791 | 831 | | |
792 | 832 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13037 | 13037 | | |
13038 | 13038 | | |
13039 | 13039 | | |
| 13040 | + | |
| 13041 | + | |
| 13042 | + | |
| 13043 | + | |
| 13044 | + | |
| 13045 | + | |
| 13046 | + | |
| 13047 | + | |
| 13048 | + | |
| 13049 | + | |
| 13050 | + | |
| 13051 | + | |
| 13052 | + | |
| 13053 | + | |
| 13054 | + | |
| 13055 | + | |
| 13056 | + | |
| 13057 | + | |
| 13058 | + | |
| 13059 | + | |
| 13060 | + | |
| 13061 | + | |
| 13062 | + | |
| 13063 | + | |
| 13064 | + | |
| 13065 | + | |
| 13066 | + | |
| 13067 | + | |
| 13068 | + | |
| 13069 | + | |
| 13070 | + | |
| 13071 | + | |
| 13072 | + | |
| 13073 | + | |
| 13074 | + | |
| 13075 | + | |
| 13076 | + | |
13040 | 13077 | | |
13041 | 13078 | | |
13042 | 13079 | | |
| |||
0 commit comments