From 65be47848df82db16b32fd9fe5bc47edde4da5a1 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Tue, 30 May 2023 11:55:08 +0800 Subject: [PATCH] github_packages: adjust upload retries We still regularly see upload failures here, so let's adjust this to see if we can try to reduce these. --- Library/Homebrew/github_packages.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index 602ba38d9b..32d9ba272b 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -429,7 +429,7 @@ class GitHubPackages "org.opencontainers.image.ref.name" => version_rebuild) puts - args = ["copy", "--retry-times=2", "--all", "oci:#{root}", image_uri.to_s] + args = ["copy", "--retry-times=3", "--all", "oci:#{root}", image_uri.to_s] if dry_run puts "#{skopeo} #{args.join(" ")} --dest-creds=#{user}:$HOMEBREW_GITHUB_PACKAGES_TOKEN" else @@ -439,8 +439,8 @@ class GitHubPackages system_command!(skopeo, verbose: true, print_stdout: true, args: args) rescue ErrorDuringExecution retry_count += 1 - odie "Cannot perform an upload to registry after retrying multiple times!" if retry_count >= 5 - sleep 5 ** retry_count + odie "Cannot perform an upload to registry after retrying multiple times!" if retry_count >= 10 + sleep 2 ** retry_count retry end