Retry gitea repo setting HTTP POSTs
I ran our global gitea project sync playbook across all eight gitea hosts and one failed with a 404 against a specific project. Rerunning the playbook against that one gitea server worked fine. Until we sort out why this might happen lets retry our HTTP POSTs up to 3 times until they succeed. Some numbers: We have ~2k repos and 8 servers and make two http requests per repo for a total of 32k requests. If one fails out of that the success rate is very high so retrying a few times should be fine. Change-Id: I937a4f852f6713a419c03a17c3b4984a97eae0d8
This commit is contained in:
parent
877e58a386
commit
177edc0abb
@ -51,6 +51,10 @@
|
|||||||
|
|
||||||
- name: Adjust repo settings
|
- name: Adjust repo settings
|
||||||
when: gitea_always_update or project.project not in gitea_repos
|
when: gitea_always_update or project.project not in gitea_repos
|
||||||
|
register: result
|
||||||
|
retries: 3
|
||||||
|
until: result is succeeded
|
||||||
|
delay: 5
|
||||||
uri:
|
uri:
|
||||||
url: "{{ gitea_url }}/{{ org }}/{{ repo }}/settings"
|
url: "{{ gitea_url }}/{{ org }}/{{ repo }}/settings"
|
||||||
validate_certs: false
|
validate_certs: false
|
||||||
@ -75,6 +79,10 @@
|
|||||||
tracker_issue_style: numeric
|
tracker_issue_style: numeric
|
||||||
- name: Set default branch
|
- name: Set default branch
|
||||||
when: gitea_always_update or project.project not in gitea_repos
|
when: gitea_always_update or project.project not in gitea_repos
|
||||||
|
register: result
|
||||||
|
retries: 3
|
||||||
|
until: result is succeeded
|
||||||
|
delay: 5
|
||||||
uri:
|
uri:
|
||||||
url: "{{ gitea_url }}/{{ org }}/{{ repo }}/settings/branches"
|
url: "{{ gitea_url }}/{{ org }}/{{ repo }}/settings/branches"
|
||||||
validate_certs: false
|
validate_certs: false
|
||||||
|
Loading…
Reference in New Issue
Block a user