Skip to content

Commit 8f5226c

Browse files
committed
feat: retry get_url calls on failures
Builds frequently fail on 502 flakes on some requests. This change retries them a few times to paper over these issues.
1 parent 870eb63 commit 8f5226c

14 files changed

Lines changed: 81 additions & 5 deletions

ansible/manifest-playbook.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,31 @@
2828
dest: /tmp/auth-v{{ gotrue_release }}-{{ gotrue_arch }}.tar.gz
2929
checksum: "{{ gotrue_checksum }}"
3030
timeout: 60
31+
register: download_result
32+
until: download_result is succeeded
33+
retries: 3
34+
delay: 2
3135

3236
- name: PostgREST - download ubuntu binary archive (arm)
3337
get_url:
3438
url: "https://github.com/PostgREST/postgrest/releases/download/v{{ postgrest_release }}/postgrest-v{{ postgrest_release }}-{{ postgrest_binary }}.tar.xz"
3539
dest: /tmp/postgrest-{{ postgrest_release }}-{{ arch }}.tar.xz
3640
checksum: "{{ postgrest_checksum }}"
3741
timeout: 60
42+
register: download_result
43+
until: download_result is succeeded
44+
retries: 3
45+
delay: 2
3846

3947
- name: Download adminapi archive
4048
get_url:
4149
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/supabase-admin-api/v{{ adminapi_release }}/supabase-admin-api_{{ adminapi_release }}_linux_{{ arch }}.tar.gz"
4250
dest: "/tmp/adminapi.tar.gz"
4351
timeout: 90
52+
register: download_result
53+
until: download_result is succeeded
54+
retries: 3
55+
delay: 2
4456

4557
- name: adminapi - unpack archive in /tmp
4658
unarchive:
@@ -57,6 +69,10 @@
5769
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/admin-mgr/v{{ adminmgr_release }}/admin-mgr_{{ adminmgr_release }}_linux_{{ arch }}.tar.gz"
5870
dest: "/tmp/admin-mgr.tar.gz"
5971
timeout: 90
72+
register: download_result
73+
until: download_result is succeeded
74+
retries: 3
75+
delay: 2
6076

6177
- name: admin-mgr - unpack archive in /tmp
6278
unarchive:
@@ -73,6 +89,10 @@
7389
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/supabase-admin-agent/v{{ supabase_admin_agent_release }}/supabase-admin-agent-{{ supabase_admin_agent_release }}-linux-{{ arch }}.tar.gz"
7490
dest: "/tmp/supabase-admin-agent.tar.gz"
7591
timeout: 90
92+
register: download_result
93+
until: download_result is succeeded
94+
retries: 3
95+
delay: 2
7696

7797
- name: supabase-admin-agent - unpack archive in /tmp
7898
unarchive:

ansible/tasks/internal/admin-mgr.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/admin-mgr/v{{ adminmgr_release }}/admin-mgr_{{ adminmgr_release }}_linux_{{ arch }}.tar.gz"
1414
dest: "/tmp/admin-mgr.tar.gz"
1515
timeout: 90
16+
register: download_result
17+
until: download_result is succeeded
18+
retries: 3
19+
delay: 2
1620

1721
- name: admin-mgr - unpack archive in /usr/bin/
1822
unarchive:

ansible/tasks/internal/install-salt.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
url: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
1212
dest: /etc/apt/keyrings/salt-archive-keyring-2023.pgp
1313
mode: '0644'
14+
register: download_result
15+
until: download_result is succeeded
16+
retries: 3
17+
delay: 2
1418

1519
- name: salt apt repo
1620
ansible.builtin.apt_repository:
@@ -32,6 +36,10 @@
3236
url: https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
3337
dest: /etc/apt/keyrings/salt-archive-keyring-2023.pgp
3438
mode: '0644'
39+
register: download_result
40+
until: download_result is succeeded
41+
retries: 3
42+
delay: 2
3543

3644
- name: salt apt repo
3745
ansible.builtin.apt_repository:

ansible/tasks/internal/postgres-exporter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
dest: /tmp/postgres_exporter.tar.gz
2727
checksum: "{{ postgres_exporter_release_checksum[platform] }}"
2828
timeout: 60
29+
register: download_result
30+
until: download_result is succeeded
31+
retries: 3
32+
delay: 2
2933

3034
- name: expand postgres exporter
3135
unarchive:

ansible/tasks/internal/supabase-admin-agent.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
url: "https://supabase-public-artifacts-bucket.s3.amazonaws.com/supabase-admin-agent/v{{ supabase_admin_agent_release }}/supabase-admin-agent-{{ supabase_admin_agent_release }}-linux-{{ arch }}.tar.gz"
5454
dest: "/tmp/supabase-admin-agent.tar.gz"
5555
timeout: 90
56+
register: download_result
57+
until: download_result is succeeded
58+
retries: 3
59+
delay: 2
5660

5761
- name: supabase-admin-agent - unpack archive in /opt
5862
unarchive:

ansible/tasks/internal/supautils.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
dest: /tmp/supautils-{{ supautils_release }}.tar.gz
1414
checksum: "{{ supautils_release_checksum }}"
1515
timeout: 60
16+
register: download_result
17+
until: download_result is succeeded
18+
retries: 3
19+
delay: 2
1620

1721
- name: supautils - unpack archive
1822
unarchive:

ansible/tasks/setup-envoy.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
owner: 'envoy'
1313
# yamllint disable-line rule:line-length
1414
url: "https://github.com/envoyproxy/envoy/releases/download/v{{ envoy_release }}/envoy-{{ envoy_release }}-linux-{{ 'aarch_64' if platform == 'arm64' else 'x86_64' }}"
15+
register: download_result
16+
until: download_result is succeeded
17+
retries: 3
18+
delay: 2
1519

1620
- name: Envoy - download hot restarter script
1721
ansible.builtin.get_url:
@@ -22,6 +26,10 @@
2226
owner: 'envoy'
2327
# yamllint disable-line rule:line-length
2428
url: "https://raw.githubusercontent.com/envoyproxy/envoy/v{{ envoy_release }}/restarter/hot-restarter.py"
29+
register: download_result
30+
until: download_result is succeeded
31+
retries: 3
32+
delay: 2
2533

2634
- name: Envoy - bump up ulimit
2735
community.general.pam_limits:

ansible/tasks/setup-gotrue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
checksum: "{{ gotrue_arm_release_checksum if platform == 'arm64' else gotrue_x86_release_checksum }}"
2424
dest: '/tmp/gotrue.tar.gz'
2525
url: "https://github.com/supabase/gotrue/releases/download/v{{ gotrue_release }}/auth-v{{ gotrue_release }}-{{ arch }}.tar.gz"
26+
register: download_result
27+
until: download_result is succeeded
28+
retries: 3
29+
delay: 2
2630

2731
- name: gotrue - create /opt/gotrue and /etc/auth.d
2832
ansible.builtin.file:

ansible/tasks/setup-kong.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
checksum: "{{ kong_deb_checksum[platform] }}"
1818
dest: '/tmp/kong.deb'
1919
url: "https://packages.konghq.com/public/gateway-28/deb/ubuntu/pool/{{ kong_release_target }}/main/k/ko/kong_2.8.1/{{ kong_deb[platform] }}"
20+
register: download_result
21+
until: download_result is succeeded
22+
retries: 3
23+
delay: 2
2024

2125
- name: Kong - deb installation
2226
ansible.builtin.apt:

ansible/tasks/setup-nginx.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
checksum: "{{ nginx_release_checksum }}"
1818
dest: '/tmp/nginx-{{ nginx_release }}.tar.gz'
1919
url: "https://nginx.org/download/nginx-{{ nginx_release }}.tar.gz"
20+
register: download_result
21+
until: download_result is succeeded
22+
retries: 3
23+
delay: 2
2024

2125
- name: nginx - unpack archive
2226
ansible.builtin.unarchive:

0 commit comments

Comments
 (0)