From b468b5e6e883a39ceaba6417ed8be1ece6ee281f Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 28 Feb 2024 00:40:42 +0100 Subject: [PATCH] build: print error and retry on symstore fail (#41452) --- script/release/uploaders/upload-symbols.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/script/release/uploaders/upload-symbols.py b/script/release/uploaders/upload-symbols.py index d48f132e6b07..d4d7cc710b99 100755 --- a/script/release/uploaders/upload-symbols.py +++ b/script/release/uploaders/upload-symbols.py @@ -80,8 +80,14 @@ def main(): def run_symstore(pdb, dest, product): - execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) - + for attempt in range(2): + try: + execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) + break + except Exception as e: + print(f"An error occurred while adding '{pdb}' to SymStore: {str(e)}") + if attempt == 0: + print("Retrying...") def upload_symbols(files): store_artifact(SYMBOLS_DIR, 'symbols',