kou commented on code in PR #39213:
URL: https://github.com/apache/arrow/pull/39213#discussion_r1425908984
##########
dev/release/download_rc_binaries.py:
##########
@@ -121,17 +121,28 @@ def _download_url(self, url, dest_path, *,
extra_args=None):
dest_path,
url,
]
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = proc.communicate()
- if proc.returncode != 0:
- try:
- # Don't leave possibly partial file around
- os.remove(dest_path)
- except IOError:
- pass
- raise Exception(f"Downloading {url} failed\n"
- f"stdout: {stdout}\nstderr: {stderr}")
+ # Retry subprocess in case it fails with OpenSSL Connection errors
+ # https://issues.apache.org/jira/browse/INFRA-25274
+ for attempt in range(5):
+ if delay := attempt * 3:
Review Comment:
We may want to avoid `:=` because it's available since Python 3.8.
I know that Python 3.7 reached EOL but some our (old) environments for
verification may use Python 3.7 or earlier...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]