From 1dd636c041d33c5d427b7f69ecc631e23eb497dd Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 16 Jul 2024 16:54:04 +0200 Subject: [PATCH 1/4] add retries for chart releaser --- .github/actions/releaser/cr.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/actions/releaser/cr.sh b/.github/actions/releaser/cr.sh index 8f4cc9ab..9de86e64 100755 --- a/.github/actions/releaser/cr.sh +++ b/.github/actions/releaser/cr.sh @@ -76,6 +76,8 @@ release_charts_inside_folders() { check_charts_released() { local folders=("$@") local unreleased_charts=() + local retries=5 + local delay=10 prepare_helm_repo @@ -90,7 +92,17 @@ check_charts_released() { chart_version=$(read_chart_version "${charts_dir}/${folder}") echo "Checking if \"$charts_dir/$folder\" has been released to the repo" - if ! chart_released "${chart_name}" "${chart_version}"; then + local released=false + for ((i=0; i Date: Tue, 16 Jul 2024 16:55:44 +0200 Subject: [PATCH 2/4] add retries for chart releaser --- .github/actions/releaser/cr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/releaser/cr.sh b/.github/actions/releaser/cr.sh index 9de86e64..caa68046 100755 --- a/.github/actions/releaser/cr.sh +++ b/.github/actions/releaser/cr.sh @@ -77,7 +77,7 @@ check_charts_released() { local folders=("$@") local unreleased_charts=() local retries=5 - local delay=10 + local delay=5 prepare_helm_repo From 92893836bad08683330442da37e3f3fc1d57cc45 Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 16 Jul 2024 16:56:40 +0200 Subject: [PATCH 3/4] add retries for chart releaser --- .github/actions/releaser/cr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/releaser/cr.sh b/.github/actions/releaser/cr.sh index caa68046..14002242 100755 --- a/.github/actions/releaser/cr.sh +++ b/.github/actions/releaser/cr.sh @@ -100,6 +100,7 @@ check_charts_released() { fi echo "Retrying in ${delay} seconds... ($((i+1))/$retries)" sleep "${delay}" + helm repo update mongodb done if [ "$released" = false ]; then From 07d5346eb1e87243003ba11be8adcc4998a91447 Mon Sep 17 00:00:00 2001 From: nam Date: Tue, 16 Jul 2024 16:57:17 +0200 Subject: [PATCH 4/4] add retries for chart releaser --- .github/actions/releaser/cr.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/releaser/cr.sh b/.github/actions/releaser/cr.sh index 14002242..4afdc232 100755 --- a/.github/actions/releaser/cr.sh +++ b/.github/actions/releaser/cr.sh @@ -100,7 +100,7 @@ check_charts_released() { fi echo "Retrying in ${delay} seconds... ($((i+1))/$retries)" sleep "${delay}" - helm repo update mongodb + update_helm_repo done if [ "$released" = false ]; then @@ -130,9 +130,13 @@ read_chart_version() { awk '/^version: /{print $2}' "$chart_path/Chart.yaml" } +update_helm_repo(){ + helm repo update mongodb +} + prepare_helm_repo() { helm repo add mongodb https://mongodb.github.io/helm-charts - helm repo update mongodb + update_helm_repo } chart_released() {