Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions tools/fuchsia/merge_and_upload_debug_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,18 @@ def ProcessCIPDPackage(upload, cipd_yaml, engine_version, out_dir, target_arch):
'fuchsia-debug-symbols-%s.cipd' % target_arch)
]

subprocess.check_call(command, cwd=_packaging_dir)

# Retry up to three times. We've seen CIPD fail on verification in some
# instances. Normally verification takes slightly more than 1 minute when
# it succeeds.
num_tries = 3
while tries in range(num_tries):
try:
subprocess.check_call(command, cwd=_packaging_dir)
break
except subprocess.CalledProcessError:
print('Failed %s times' % tries + 1)
if tries == num_tries - 1:
raise
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe raise the actual exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got rid of the success part - that was an experiment I forgot to get rid of.

raise should just reraise AFAIK.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL


def CreateTarFile(folder_path, base_dir):
archive_name = os.path.basename(folder_path)
Expand Down