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

This commit is contained in:
Shelley Vohr 2024-02-28 00:40:42 +01:00 committed by GitHub
parent d89ad1106f
commit b468b5e6e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,8 +80,14 @@ def main():
def run_symstore(pdb, dest, product): def run_symstore(pdb, dest, product):
for attempt in range(2):
try:
execute(['symstore', 'add', '/r', '/f', pdb, '/s', dest, '/t', product]) 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): def upload_symbols(files):
store_artifact(SYMBOLS_DIR, 'symbols', store_artifact(SYMBOLS_DIR, 'symbols',