kou commented on code in PR #39213:
URL: https://github.com/apache/arrow/pull/39213#discussion_r1426048110
##########
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:
The following may be more readable :-)
```suggestion
if attempt > 0:
delay = attempt * 3:
```
--
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]