This is an automated email from the ASF dual-hosted git repository.
bugraoz pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 20961048f7a [v3-1-test] Adding a basic retry mechanism for svn based
commands (#61620) (#61628)
20961048f7a is described below
commit 20961048f7a3d1ebe4397b89966bf9b496428553
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Feb 8 11:35:31 2026 +0100
[v3-1-test] Adding a basic retry mechanism for svn based commands (#61620)
(#61628)
(cherry picked from commit ceb87dd1837fbf31aa495bf16c3e331ac323a747)
Co-authored-by: Amogh Desai <[email protected]>
---
.../commands/release_candidate_command.py | 42 ++++++++++++++++------
1 file changed, 32 insertions(+), 10 deletions(-)
diff --git
a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
index 64eb7b937d9..6c66242e3de 100644
--- a/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/release_candidate_command.py
@@ -20,8 +20,10 @@ import os
import re
import shutil
import sys
+import time
from datetime import date
from pathlib import Path
+from subprocess import CalledProcessError
import click
@@ -51,6 +53,8 @@ from airflow_breeze.utils.run_utils import run_command
from airflow_breeze.utils.shared_options import get_dry_run
RC_PATTERN =
re.compile(r"^(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)rc(?P<rc>\d+)$")
+SVN_NUM_TRIES = 3
+SVN_OPERATION_RETRY_DELAY = 5
def validate_remote_tracks_apache_airflow(remote_name):
@@ -462,16 +466,34 @@ def tag_and_push_constraints(version, version_branch,
remote_name):
def clone_asf_repo(version, repo_root):
if confirm_action("Do you want to clone asf repo?"):
os.chdir(repo_root)
- run_command(
- ["svn", "checkout", "--depth=immediates",
"https://dist.apache.org/repos/dist", "asf-dist"],
- check=True,
- dry_run_override=False,
- )
- run_command(
- ["svn", "update", "--set-depth=infinity", "asf-dist/dev/airflow"],
- check=True,
- dry_run_override=False,
- )
+
+ for attempt in range(1, SVN_NUM_TRIES):
+ try:
+ run_command(
+ [
+ "svn",
+ "checkout",
+ "--depth=immediates",
+ "https://dist.apache.org/repos/dist",
+ "asf-dist",
+ ],
+ check=True,
+ dry_run_override=False,
+ )
+ run_command(
+ ["svn", "update", "--set-depth=infinity",
"asf-dist/dev/airflow"],
+ check=True,
+ dry_run_override=False,
+ )
+ break
+ except CalledProcessError:
+ if attempt == SVN_NUM_TRIES:
+ raise
+ console_print(
+ f"[warning]SVN operation failed. Retrying! {SVN_NUM_TRIES
- attempt} tries left."
+ )
+ time.sleep(SVN_OPERATION_RETRY_DELAY)
+
console_print("[success]Cloned ASF repo successfully")