Commit 3191bd1
fix: correct backoff timing, wire retry_endlessly, add backoff cap
- Fix exponential backoff sequence: 2^(attempt-1) to match old backoff.expo
(1, 2, 4, 8s) instead of 2^attempt (2, 4, 8, 16s)
- Wire retry_endlessly into the retry loop so rate-limited requests
without exit_on_rate_limit genuinely retry past the budget
- Guard retry_endlessly with user_defined_backoff_time is None to
preserve the old mutually-exclusive branching (custom backoff always
bounded, endless only for rate limits without a strategy)
- Add _MAX_BACKOFF_SECONDS (300s) cap on exponential backoff
- Split test_backoff_strategy_endless into two tests that verify
bounded vs endless behavior independently
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ed42701 commit 3191bd1
2 files changed
Lines changed: 58 additions & 23 deletions
File tree
- airbyte_cdk/sources/streams/http
- unit_tests/sources/streams/http
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| 254 | + | |
| 255 | + | |
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
| 259 | + | |
258 | 260 | | |
259 | | - | |
260 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
264 | | - | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| |||
293 | 296 | | |
294 | 297 | | |
295 | 298 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
| |||
532 | 534 | | |
533 | 535 | | |
534 | 536 | | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
535 | 540 | | |
536 | 541 | | |
537 | 542 | | |
| 543 | + | |
538 | 544 | | |
539 | 545 | | |
540 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
689 | 689 | | |
690 | 690 | | |
691 | 691 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | 692 | | |
697 | | - | |
698 | | - | |
699 | | - | |
| 693 | + | |
| 694 | + | |
700 | 695 | | |
701 | 696 | | |
702 | 697 | | |
| |||
705 | 700 | | |
706 | 701 | | |
707 | 702 | | |
708 | | - | |
709 | | - | |
710 | 703 | | |
711 | 704 | | |
712 | | - | |
| 705 | + | |
713 | 706 | | |
714 | 707 | | |
715 | 708 | | |
716 | 709 | | |
717 | | - | |
| 710 | + | |
718 | 711 | | |
719 | | - | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
720 | 744 | | |
721 | 745 | | |
722 | 746 | | |
| |||
834 | 858 | | |
835 | 859 | | |
836 | 860 | | |
837 | | - | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
838 | 867 | | |
839 | 868 | | |
840 | 869 | | |
| |||
0 commit comments