s3_upload: improve url validation and error message

Ensure s3_upload correctly validates the S3 folder url by requiring it
to end with /. This prevents wrong uploads to invalid paths, such as
file urls. Also improve the error message.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34255>
This commit is contained in:
Vignesh Raman
2025-03-28 13:44:30 +05:30
committed by Marge Bot
parent 248edb43c3
commit 7959250d1e
4 changed files with 8 additions and 5 deletions

View File

@@ -230,7 +230,7 @@ cleanup
# upload artifacts (lava jobs)
if [ -n "$S3_RESULTS_UPLOAD" ]; then
tar --zstd -cf results.tar.zst results/;
s3_upload results.tar.zst https://"$S3_RESULTS_UPLOAD"/
s3_upload results.tar.zst "https://${S3_RESULTS_UPLOAD}/"
fi
# We still need to echo the hwci: mesa message, as some scripts rely on it, such