Retry sentry uploads (#43267)

We see internal server errors occasionally; and it's very annoying to
have to re-run the entire step

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin
2025-11-21 13:29:08 -07:00
committed by GitHub
parent dfa102c5ae
commit 279b76d440
3 changed files with 43 additions and 6 deletions
+15 -2
View File
@@ -300,8 +300,21 @@ function upload_debug_symbols() {
# note: this uploads the unstripped binary which is needed because it contains
# .eh_frame data for stack unwinding. see https://github.com/getsentry/symbolic/issues/783
sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
"target/${target_triple}/${target_dir}/zed.dwarf" \
"target/${target_triple}/${target_dir}/remote_server.dwarf"
# Try uploading up to 3 times
for attempt in 1 2 3; do
echo "Sentry upload attempt $attempt..."
if sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
"target/${target_triple}/${target_dir}/zed.dwarf" \
"target/${target_triple}/${target_dir}/remote_server.dwarf"; then
break
else
echo "Sentry upload failed on attempt $attempt"
if [ $attempt -eq 3 ]; then
echo "All sentry upload attempts failed"
exit 1
fi
fi
done
else
echo "missing SENTRY_AUTH_TOKEN. skipping sentry upload."
fi