From e7212772e7766ba0529f6ef9a979b7ce9a461e01 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 19 May 2018 14:05:25 +0200 Subject: [PATCH 1/2] Output elapsed time with S3 upload It seems that it fails with "Forbidden" when it takes longer than 15s, so this at least helps with debugging that. The Bash uploader gzips the data file, so it is faster to upload and does not trigger it with the given data file / internet connection. (Pdb++) s3.text '\nAccessDeniedRequest has expired2018-05-19T11:58:04Z2018-05-19T11:58:10ZEFE63A2DA8CE9726LXoeTEXV7h3wN5DICvZg/U6uWIeyOgkJ1JnyEOQCpKNkQtpst4qKhkxuTgPnJeV3uB1jOexYP+s=' --- codecov/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/codecov/__init__.py b/codecov/__init__.py index 82e12136..3155bff3 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -739,6 +739,7 @@ def main(*argv, **kwargs): s3 = requests.put(upload_url, data=reports, headers={'Content-Type': 'text/plain', 'x-amz-acl': 'public-read'}) + write(' Took %s' % s3.elapsed) s3.raise_for_status() assert s3.status_code == 200 write(' ' + result) From f02b76778330deb6a3dcbbb08dcd9aa34c7adfca Mon Sep 17 00:00:00 2001 From: Thomas Hu Date: Mon, 14 Sep 2020 17:42:19 -0400 Subject: [PATCH 2/2] black --- codecov/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov/__init__.py b/codecov/__init__.py index a5e366f6..dec14bad 100644 --- a/codecov/__init__.py +++ b/codecov/__init__.py @@ -1146,7 +1146,7 @@ def main(*argv, **kwargs): ) s3.raise_for_status() assert s3.status_code == 200 - write(' Uploading to S3 took %s' % s3.elapsed) + write(" Uploading to S3 took %s" % s3.elapsed) write(" " + result) success = True