File tree Expand file tree Collapse file tree 3 files changed +43
-6
lines changed Expand file tree Collapse file tree 3 files changed +43
-6
lines changed Original file line number Diff line number Diff line change 9292 echo " Uploading zed debug symbols to sentry..."
9393 # note: this uploads the unstripped binary which is needed because it contains
9494 # .eh_frame data for stack unwinding. see https://github.com/getsentry/symbolic/issues/783
95- sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
96- " ${target_dir} /${target_triple} " /release/zed \
97- " ${target_dir} /${remote_server_triple} " /release/remote_server
95+ for attempt in 1 2 3; do
96+ echo " Attempting sentry upload (attempt $attempt /3)..."
97+ if sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
98+ " ${target_dir} /${target_triple} " /release/zed \
99+ " ${target_dir} /${remote_server_triple} " /release/remote_server; then
100+ echo " Sentry upload successful on attempt $attempt "
101+ break
102+ else
103+ echo " Sentry upload failed on attempt $attempt "
104+ if [ $attempt -eq 3 ]; then
105+ echo " All sentry upload attempts failed"
106+ fi
107+ fi
108+ done
98109 else
99110 echo " missing SENTRY_AUTH_TOKEN. skipping sentry upload."
100111 fi
Original file line number Diff line number Diff line change @@ -300,8 +300,21 @@ function upload_debug_symbols() {
300300 # note: this uploads the unstripped binary which is needed because it contains
301301 # .eh_frame data for stack unwinding. see https://github.com/getsentry/symbolic/issues/783
302302 sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
303- " target/${target_triple} /${target_dir} /zed.dwarf" \
304- " target/${target_triple} /${target_dir} /remote_server.dwarf"
303+ # Try uploading up to 3 times
304+ for attempt in 1 2 3; do
305+ echo " Sentry upload attempt $attempt ..."
306+ if sentry-cli debug-files upload --include-sources --wait -p zed -o zed-dev \
307+ " target/${target_triple} /${target_dir} /zed.dwarf" \
308+ " target/${target_triple} /${target_dir} /remote_server.dwarf" ; then
309+ break
310+ else
311+ echo " Sentry upload failed on attempt $attempt "
312+ if [ $attempt -eq 3 ]; then
313+ echo " All sentry upload attempts failed"
314+ exit 1
315+ fi
316+ fi
317+ done
305318 else
306319 echo " missing SENTRY_AUTH_TOKEN. skipping sentry upload."
307320 fi
Original file line number Diff line number Diff line change @@ -147,7 +147,20 @@ function UploadToSentry {
147147 return
148148 }
149149 Write-Output " Uploading zed debug symbols to sentry..."
150- sentry- cli debug-files upload -- include- sources -- wait - p zed - o zed- dev $CargoOutDir
150+ for ($i = 1 ; $i -le 3 ; $i ++ ) {
151+ try {
152+ sentry- cli debug-files upload -- include- sources -- wait - p zed - o zed- dev $CargoOutDir
153+ break
154+ }
155+ catch {
156+ Write-Output " Sentry upload attempt $i failed: $_ "
157+ if ($i -eq 3 ) {
158+ Write-Output " All sentry upload attempts failed"
159+ throw
160+ }
161+ Start-Sleep - Seconds 2
162+ }
163+ }
151164}
152165
153166function MakeAppx {
You can’t perform that action at this time.
0 commit comments