Skip to content

Commit cd69290

Browse files
fix[ci]: more cat-s3 retries and sleep a little between tries (#5051)
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
1 parent 04ef310 commit cd69290

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/cat-s3.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local_copy=$(mktemp)
1111
local_concatenated=$(mktemp)
1212
n_failures=0
1313

14-
while (( n_failures < 2 )); do
14+
while (( n_failures < 5 )); do
1515
current_etag=$(aws s3api head-object --bucket "$bucket" --key "$key" --query ETag --output text)
1616
if [[ "$current_etag" == "null" ]]; then
1717
echo "Failed to retrieve ETag. Exiting."
@@ -39,6 +39,8 @@ while (( n_failures < 2 )); do
3939
aws s3api put-object --bucket "$bucket" --key "$key" --body "$local_concatenated" --if-match "$current_etag" || {
4040
echo "ETag does not match during upload. Trying again."
4141
n_failures=$(( n_failures + 1 ))
42+
# wait for before retrying
43+
sleep 0.1
4244
continue
4345
}
4446

0 commit comments

Comments
 (0)