From 078bfbff5d59e734c07429254e9760f0dec722be Mon Sep 17 00:00:00 2001 From: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com> Date: Thu, 5 Sep 2024 09:56:37 -0600 Subject: [PATCH] [v11.0.x] CI/CD: Update retry logic for package validation (#92992) CI/CD: Update retry logic for package validation (#92943) * baldm0mma/retry_command/ update retry logic for package validation * baldm0mma/retry_command/ update to 15 minutes * baldm0mma/retry_command/ update to 30 minute retry * baldm0mma/retry_command/ make drone (cherry picked from commit d3ceaf41c29cbd4d33868ce3b4f9c47ba5bf5d4f) --- .drone.yml | 18 +++++++++--------- scripts/drone/steps/lib.star | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 600e9a4a5e3..54394e5de0d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3150,8 +3150,8 @@ steps: - ' echo ''All attempts failed''' - ' exit 1' - ' fi' - - ' echo "Waiting 60 seconds before next attempt..."' - - ' sleep 60' + - ' echo "Waiting 30 seconds before next attempt..."' + - ' sleep 30' - ' fi' - done - 'echo "Step 6: Verifying Grafana installation..."' @@ -3199,8 +3199,8 @@ steps: - ' echo ''All attempts failed''' - ' exit 1' - ' fi' - - ' echo "Waiting 60 seconds before next attempt..."' - - ' sleep 60' + - ' echo "Waiting 30 seconds before next attempt..."' + - ' sleep 30' - ' fi' - done - ' echo "Verifying GPG key..."' @@ -3327,8 +3327,8 @@ steps: - ' echo ''All attempts failed''' - ' exit 1' - ' fi' - - ' echo "Waiting 60 seconds before next attempt..."' - - ' sleep 60' + - ' echo "Waiting 30 seconds before next attempt..."' + - ' sleep 30' - ' fi' - done - 'echo "Step 6: Verifying Grafana installation..."' @@ -3377,8 +3377,8 @@ steps: - ' echo ''All attempts failed''' - ' exit 1' - ' fi' - - ' echo "Waiting 60 seconds before next attempt..."' - - ' sleep 60' + - ' echo "Waiting 30 seconds before next attempt..."' + - ' sleep 30' - ' fi' - done - ' echo "Verifying GPG key..."' @@ -5381,6 +5381,6 @@ kind: secret name: gcr_credentials --- kind: signature -hmac: 6f869f73371948ecd50f13c122a7554b88dc8856768e5c068edb3b2411f2972b +hmac: f849714663e8601fb31344bfb7550c5a4fc77c66ce4176c79bbd40179b678055 ... diff --git a/scripts/drone/steps/lib.star b/scripts/drone/steps/lib.star index 0b96b3c0267..213865b8c28 100644 --- a/scripts/drone/steps/lib.star +++ b/scripts/drone/steps/lib.star @@ -1223,7 +1223,8 @@ def publish_linux_packages_step(package_manager = "deb"): }, } -def retry_command(command, attempts = 5, delay = 60): +# This retry will currently continue for 30 minutes until fail, unless successful. +def retry_command(command, attempts = 60, delay = 30): return [ "for i in $(seq 1 %d); do" % attempts, " if %s; then" % command,