From 735ad2d2111c7c030ac0832ddf9e14d588dd1dfa Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Tue, 28 Jul 2020 07:47:40 +0200 Subject: [PATCH] ci: Always print status code of HTTP uploads in tracie I'm seeing occasional unexpected 403 errors when uploading artifacts. Print the response in case MinIO is telling us why. Signed-off-by: Tomeu Vizoso Reviewed-by: Daniel Stone Reviewed-by: Rohan Garg Part-of: --- .gitlab-ci/tracie/tracie.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/tracie/tracie.py b/.gitlab-ci/tracie/tracie.py index d220ef5dc60..f8e3eab870b 100644 --- a/.gitlab-ci/tracie/tracie.py +++ b/.gitlab-ci/tracie/tracie.py @@ -92,7 +92,8 @@ def upload_artifact(file_name, key, content_type): 'x-amz-security-token': minio_token} print("Uploading artifact to %s" % url); r = requests.put(url, headers=headers, data=data) - #print(r.text) + if r.status_code >= 400: + print(r.text) r.raise_for_status() def gitlab_check_trace(project_url, device_name, trace, expectation): -- 2.30.2