Commit 040bcd3
committed
fix: Add retry logic to GitHub and GitLab tag providers
Add application-level retry logic to GitHubTagProvider and
GitLabTagProvider to handle transient API failures, particularly
common with gitlab.com. The implementation uses the existing
retry_on_exception decorator with 5 attempts and exponential backoff.
Changes:
- Apply @retry_on_exception decorator to GitHubTagProvider._find_tags()
- Apply @retry_on_exception decorator to GitLabTagProvider._find_tags()
- Add HTTP 408 (Request Timeout) to retry status codes
- Remove redundant try-except blocks that immediately re-raised
- Update documentation to reflect 408 status code handling
The two-layer retry strategy (HTTP-level + application-level)
significantly improves build reliability when GitHub/GitLab APIs
experience intermittent failures.
Fixes: #810
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Ioannis Angelakopoulos <iangelak@redhat.com>1 parent 74b0af4 commit 040bcd3
4 files changed
Lines changed: 21 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
763 | 770 | | |
764 | 771 | | |
765 | 772 | | |
| |||
773 | 780 | | |
774 | 781 | | |
775 | 782 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
| 783 | + | |
| 784 | + | |
787 | 785 | | |
788 | 786 | | |
789 | 787 | | |
| |||
834 | 832 | | |
835 | 833 | | |
836 | 834 | | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
837 | 841 | | |
838 | 842 | | |
839 | 843 | | |
840 | 844 | | |
841 | 845 | | |
842 | 846 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
| 847 | + | |
| 848 | + | |
854 | 849 | | |
855 | 850 | | |
856 | 851 | | |
| |||
0 commit comments