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:
+15
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user