Browse Source

build: print error and retry on symstore fail (#41452)

Shelley Vohr 1 year ago
parent
commit
b468b5e6e8
1 changed files with 8 additions and 2 deletions
  1. 8 2
      script/release/uploaders/upload-symbols.py

+ 8 - 2
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',