Skip to content

Commit fc4d74b

Browse files
committed
curl retry flag which should support 429 errors (and as of 7.66.0 should respect the Retry-After response header)
1 parent 1931fc0 commit fc4d74b

File tree

35 files changed

+78
-78
lines changed

35 files changed

+78
-78
lines changed

e2e/test/fw-use-specified-nb/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
2424
create_fw=$(curl -s --write-out "%{http_code}\n" --output /dev/null --request POST \
2525
-H "Authorization: Bearer $LINODE_TOKEN" \
26-
-H "Content-Type: application/json" \
26+
-H "Content-Type: application/json" --fail-early --retry 3 \
2727
-H "accept: application/json" \
2828
"$LINODE_URL/v4/networking/firewalls" \
2929
--data "
@@ -84,7 +84,7 @@ spec:
8484
8585
fwid=$(curl -s \
8686
-H "Authorization: Bearer $LINODE_TOKEN" \
87-
-H "Content-Type: application/json" \
87+
-H "Content-Type: application/json" --fail-early --retry 3 \
8888
-H "X-Filter: {\"label\": \"$FWLABEL\"}" \
8989
"$LINODE_URL/v4/networking/firewalls" | jq .data[].id)
9090
@@ -101,7 +101,7 @@ spec:
101101
102102
fwconfig=$(curl -s \
103103
-H "Authorization: Bearer $LINODE_TOKEN" \
104-
-H "Content-Type: application/json" \
104+
-H "Content-Type: application/json" --fail-early --retry 3 \
105105
"$LINODE_URL/v4/networking/firewalls/$fwid" || true)
106106
107107
fw_attached_to_nb=$(echo $fwconfig | jq ".entities[] | select(.id == $nbid) | .id == $nbid")
@@ -116,7 +116,7 @@ spec:
116116
117117
curl -s -X DELETE \
118118
-H "Authorization: Bearer $LINODE_TOKEN" \
119-
-H "Content-Type: application/json" \
119+
-H "Content-Type: application/json" --fail-early --retry 3 \
120120
"$LINODE_URL/v4/networking/firewalls/$fwid"
121121
check:
122122
($error == null): true

e2e/test/lb-created-with-new-nb-id/chainsaw-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spec:
4444
4545
nbid=$(curl -s --request POST \
4646
-H "Authorization: Bearer $LINODE_TOKEN" \
47-
-H "Content-Type: application/json" \
47+
-H "Content-Type: application/json" --fail-early --retry 3 \
4848
-H "accept: application/json" \
4949
"$LINODE_URL/v4beta/nodebalancers" \
5050
--data "$data" | jq .id)
@@ -106,7 +106,7 @@ spec:
106106
# Get VPC config if it exists
107107
vpcconfig=$(curl -s \
108108
-H "Authorization: Bearer $LINODE_TOKEN" \
109-
-H "Content-Type: application/json" \
109+
-H "Content-Type: application/json" --fail-early --retry 3 \
110110
"$LINODE_URL/v4beta/nodebalancers/$old_nbid/vpcs")
111111
112112
echo "Old Nodebalancer ID: $old_nbid"
@@ -122,7 +122,7 @@ spec:
122122
123123
nbid=$(curl -s --request POST \
124124
-H "Authorization: Bearer $LINODE_TOKEN" \
125-
-H "Content-Type: application/json" \
125+
-H "Content-Type: application/json" --fail-early --retry 3 \
126126
-H "accept: application/json" \
127127
"$LINODE_URL/v4beta/nodebalancers" \
128128
--data "$data" | jq .id)

e2e/test/lb-created-with-reserved-ip-and-nb-id-annotations/chainsaw-test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
3838
reserved_ip=$(curl -s --request POST \
3939
-H "Authorization: Bearer $LINODE_TOKEN" \
40-
-H "Content-Type: application/json" \
40+
-H "Content-Type: application/json" --fail-early --retry 3 \
4141
-H "accept: application/json" \
4242
"${LINODE_URL}/v4beta/networking/reserved/ips" \
4343
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -52,7 +52,7 @@ spec:
5252
5353
nb_id=$(curl -s --request POST \
5454
-H "Authorization: Bearer $LINODE_TOKEN" \
55-
-H "Content-Type: application/json" \
55+
-H "Content-Type: application/json" --fail-early --retry 3 \
5656
-H "accept: application/json" \
5757
"${LINODE_URL}/v4beta/nodebalancers" \
5858
--data "$payload" | jq .id)
@@ -97,7 +97,7 @@ spec:
9797
9898
delete_rip=$(curl -s --request DELETE \
9999
-H "Authorization: Bearer $LINODE_TOKEN" \
100-
-H "Content-Type: application/json" \
100+
-H "Content-Type: application/json" --fail-early --retry 3 \
101101
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
102102
103103
if [[ "$delete_rip" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-attached-to-nb/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
3939
reserved_ip=$(curl -s --request POST \
4040
-H "Authorization: Bearer $LINODE_TOKEN" \
41-
-H "Content-Type: application/json" \
41+
-H "Content-Type: application/json" --fail-early --retry 3 \
4242
-H "accept: application/json" \
4343
"${LINODE_URL}/v4beta/networking/reserved/ips" \
4444
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -53,7 +53,7 @@ spec:
5353
5454
nb_id=$(curl -s --request POST \
5555
-H "Authorization: Bearer $LINODE_TOKEN" \
56-
-H "Content-Type: application/json" \
56+
-H "Content-Type: application/json" --fail-early --retry 3 \
5757
-H "accept: application/json" \
5858
"${LINODE_URL}/v4beta/nodebalancers" \
5959
--data "$payload" | jq .id)
@@ -103,7 +103,7 @@ spec:
103103
104104
delete_rip=$(curl -s --request DELETE \
105105
-H "Authorization: Bearer $LINODE_TOKEN" \
106-
-H "Content-Type: application/json" \
106+
-H "Content-Type: application/json" --fail-early --retry 3 \
107107
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
108108
109109
if [[ "$delete_rip" == "{}" ]]; then
@@ -114,7 +114,7 @@ spec:
114114
115115
del_nb=$(curl -s --request DELETE \
116116
-H "Authorization: Bearer $LINODE_TOKEN" \
117-
-H "Content-Type: application/json" \
117+
-H "Content-Type: application/json" --fail-early --retry 3 \
118118
"${LINODE_URL}/v4beta/nodebalancers/$nb_id" )
119119
120120
if [[ "$del_nb" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-change-ip-concurrently/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
2121
reserved_ip=$(curl -s --request POST \
2222
-H "Authorization: Bearer $LINODE_TOKEN" \
23-
-H "Content-Type: application/json" \
23+
-H "Content-Type: application/json" --fail-early --retry 3 \
2424
-H "accept: application/json" \
2525
"${LINODE_URL}/v4beta/networking/reserved/ips" \
2626
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -34,7 +34,7 @@ spec:
3434
3535
reserved_ip2=$(curl -s --request POST \
3636
-H "Authorization: Bearer $LINODE_TOKEN" \
37-
-H "Content-Type: application/json" \
37+
-H "Content-Type: application/json" --fail-early --retry 3 \
3838
-H "accept: application/json" \
3939
"${LINODE_URL}/v4beta/networking/reserved/ips" \
4040
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -88,7 +88,7 @@ spec:
8888
8989
delete_rip=$(curl -s --request DELETE \
9090
-H "Authorization: Bearer $LINODE_TOKEN" \
91-
-H "Content-Type: application/json" \
91+
-H "Content-Type: application/json" --fail-early --retry 3 \
9292
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
9393
9494
if [[ "$delete_rip" == "{}" ]]; then
@@ -99,7 +99,7 @@ spec:
9999
100100
delete_rip2=$(curl -s --request DELETE \
101101
-H "Authorization: Bearer $LINODE_TOKEN" \
102-
-H "Content-Type: application/json" \
102+
-H "Content-Type: application/json" --fail-early --retry 3 \
103103
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip2" )
104104
105105
if [[ "$delete_rip2" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-change-ip-unreserved/chainsaw-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
2121
reserved_ip=$(curl -s --request POST \
2222
-H "Authorization: Bearer $LINODE_TOKEN" \
23-
-H "Content-Type: application/json" \
23+
-H "Content-Type: application/json" --fail-early --retry 3 \
2424
-H "accept: application/json" \
2525
"${LINODE_URL}/v4beta/networking/reserved/ips" \
2626
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -66,7 +66,7 @@ spec:
6666
6767
delete_rip=$(curl -s --request DELETE \
6868
-H "Authorization: Bearer $LINODE_TOKEN" \
69-
-H "Content-Type: application/json" \
69+
-H "Content-Type: application/json" --fail-early --retry 3 \
7070
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
7171
7272
if [[ "$delete_rip" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-change-ip/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
2121
reserved_ip=$(curl -s --request POST \
2222
-H "Authorization: Bearer $LINODE_TOKEN" \
23-
-H "Content-Type: application/json" \
23+
-H "Content-Type: application/json" --fail-early --retry 3 \
2424
-H "accept: application/json" \
2525
"${LINODE_URL}/v4beta/networking/reserved/ips" \
2626
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -33,7 +33,7 @@ spec:
3333
3434
reserved_ip2=$(curl -s --request POST \
3535
-H "Authorization: Bearer $LINODE_TOKEN" \
36-
-H "Content-Type: application/json" \
36+
-H "Content-Type: application/json" --fail-early --retry 3 \
3737
-H "accept: application/json" \
3838
"${LINODE_URL}/v4beta/networking/reserved/ips" \
3939
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -84,7 +84,7 @@ spec:
8484
fi
8585
delete_rip=$(curl -s --request DELETE \
8686
-H "Authorization: Bearer $LINODE_TOKEN" \
87-
-H "Content-Type: application/json" \
87+
-H "Content-Type: application/json" --fail-early --retry 3 \
8888
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
8989
9090
if [[ "$delete_rip" == "{}" ]]; then
@@ -95,7 +95,7 @@ spec:
9595
9696
delete_rip2=$(curl -s --request DELETE \
9797
-H "Authorization: Bearer $LINODE_TOKEN" \
98-
-H "Content-Type: application/json" \
98+
-H "Content-Type: application/json" --fail-early --retry 3 \
9999
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip2" )
100100
101101
if [[ "$delete_rip2" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-linode-range/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
2020
reserved_ip=$(curl -s --request POST \
2121
-H "Authorization: Bearer $LINODE_TOKEN" \
22-
-H "Content-Type: application/json" \
22+
-H "Content-Type: application/json" --fail-early --retry 3 \
2323
-H "accept: application/json" \
2424
"${LINODE_URL}/v4beta/networking/reserved/ips" \
2525
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -34,7 +34,7 @@ spec:
3434
3535
fw_id=$(curl -s --request POST \
3636
-H "Authorization: Bearer $LINODE_TOKEN" \
37-
-H "Content-Type: application/json" \
37+
-H "Content-Type: application/json" --fail-early --retry 3 \
3838
-H "accept: application/json" \
3939
"$LINODE_URL/v4/networking/firewalls" \
4040
--data "
@@ -103,7 +103,7 @@ spec:
103103
104104
delete_fw=$(curl -s -X DELETE \
105105
-H "Authorization: Bearer $LINODE_TOKEN" \
106-
-H "Content-Type: application/json" \
106+
-H "Content-Type: application/json" --fail-early --retry 3 \
107107
"$LINODE_URL/v4/networking/firewalls/$fw_id")
108108
109109
if [[ "$delete_fw" == "{}" ]]; then
@@ -114,7 +114,7 @@ spec:
114114
115115
delete_rip=$(curl -s --request DELETE \
116116
-H "Authorization: Bearer $LINODE_TOKEN" \
117-
-H "Content-Type: application/json" \
117+
-H "Content-Type: application/json" --fail-early --retry 3 \
118118
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
119119
120120
if [[ "$delete_rip" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-multiple-change-ip/chainsaw-test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
2121
reserved_ip=$(curl -s --request POST \
2222
-H "Authorization: Bearer $LINODE_TOKEN" \
23-
-H "Content-Type: application/json" \
23+
-H "Content-Type: application/json" --fail-early --retry 3 \
2424
-H "accept: application/json" \
2525
"${LINODE_URL}/v4beta/networking/reserved/ips" \
2626
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -34,7 +34,7 @@ spec:
3434
3535
reserved_ip2=$(curl -s --request POST \
3636
-H "Authorization: Bearer $LINODE_TOKEN" \
37-
-H "Content-Type: application/json" \
37+
-H "Content-Type: application/json" --fail-early --retry 3 \
3838
-H "accept: application/json" \
3939
"${LINODE_URL}/v4beta/networking/reserved/ips" \
4040
--data "{\"region\": \"$LINODE_REGION\"}" | jq .address)
@@ -89,7 +89,7 @@ spec:
8989
9090
delete_rip=$(curl -s --request DELETE \
9191
-H "Authorization: Bearer $LINODE_TOKEN" \
92-
-H "Content-Type: application/json" \
92+
-H "Content-Type: application/json" --fail-early --retry 3 \
9393
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
9494
9595
if [[ "$delete_rip" == "{}" ]]; then
@@ -100,7 +100,7 @@ spec:
100100
101101
delete_rip2=$(curl -s --request DELETE \
102102
-H "Authorization: Bearer $LINODE_TOKEN" \
103-
-H "Content-Type: application/json" \
103+
-H "Content-Type: application/json" --fail-early --retry 3 \
104104
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip2" )
105105
106106
if [[ "$delete_rip2" == "{}" ]]; then

e2e/test/lb-created-with-reserved-ip-nb-range/chainsaw-test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
2525
nbconf=$(curl -s --request POST \
2626
-H "Authorization: Bearer $LINODE_TOKEN" \
27-
-H "Content-Type: application/json" \
27+
-H "Content-Type: application/json" --fail-early --retry 3 \
2828
-H "accept: application/json" \
2929
"${LINODE_URL}/v4beta/nodebalancers" \
3030
--data "{\"label\": \"$LABEL\", \"region\": \"$LINODE_REGION\"}")
@@ -42,7 +42,7 @@ spec:
4242
ip=$(echo "$ip" | tr -d '"')
4343
update_ip=$(curl --no-keepalive -s --request PUT \
4444
-H "Authorization: Bearer $LINODE_TOKEN" \
45-
-H "Content-Type: application/json" \
45+
-H "Content-Type: application/json" --fail-early --retry 3 \
4646
-H "accept: application/json" \
4747
"${LINODE_URL}/v4beta/networking/ips/$ip" \
4848
--data "{\"reserved\": true}")
@@ -53,7 +53,7 @@ spec:
5353

5454
del_nb=$(curl -s --no-keepalive --request DELETE \
5555
-H "Authorization: Bearer $LINODE_TOKEN" \
56-
-H "Content-Type: application/json" \
56+
-H "Content-Type: application/json" --fail-early --retry 3 \
5757
-H "accept: application/json" \
5858
"${LINODE_URL}/v4beta/nodebalancers/$nbid")
5959
response=$($delnb)
@@ -66,7 +66,7 @@ spec:
6666

6767
fw_id=$(curl -s --request POST \
6868
-H "Authorization: Bearer $LINODE_TOKEN" \
69-
-H "Content-Type: application/json" \
69+
-H "Content-Type: application/json" --fail-early --retry 3 \
7070
-H "accept: application/json" \
7171
"$LINODE_URL/v4/networking/firewalls" \
7272
--data "
@@ -135,7 +135,7 @@ spec:
135135
136136
delete_fw=$(curl -s -X DELETE \
137137
-H "Authorization: Bearer $LINODE_TOKEN" \
138-
-H "Content-Type: application/json" \
138+
-H "Content-Type: application/json" --fail-early --retry 3 \
139139
"$LINODE_URL/v4/networking/firewalls/$fw_id")
140140
141141
if [[ "$delete_fw" == "{}" ]]; then
@@ -146,7 +146,7 @@ spec:
146146
147147
delete_rip=$(curl -s --request DELETE \
148148
-H "Authorization: Bearer $LINODE_TOKEN" \
149-
-H "Content-Type: application/json" \
149+
-H "Content-Type: application/json" --fail-early --retry 3 \
150150
"${LINODE_URL}/v4beta/networking/reserved/ips/$reserved_ip" )
151151
152152
if [[ "$delete_rip" == "{}" ]]; then

0 commit comments

Comments
 (0)