From 477308a7bd2154a156600cb8a4a07f555a629cd4 Mon Sep 17 00:00:00 2001 From: iker barriocanal <32816711+iker-barriocanal@users.noreply.github.com> Date: Wed, 17 Nov 2021 17:24:01 +0100 Subject: [PATCH] Improve comment of assumptions on getting checksum --- src/targets/github.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/targets/github.ts b/src/targets/github.ts index 65bc06a2..a99a25d4 100644 --- a/src/targets/github.ts +++ b/src/targets/github.ts @@ -395,11 +395,13 @@ export class GithubTarget extends BaseTarget { } private async checksumFromUrl(url: string): Promise { - // XXX: This is a bit hacky as we rely on two things: - // 1. GitHub issuing a redirect to S3, where they store the artifacts, - // or at least pass those request headers unmodified to us - // 2. AWS S3 using the MD5 hash of the file for its ETag cache header - // when we issue a HEAD request. + // XXX: This is a bit hacky as we rely on various things: + // 1. GitHub issuing a redirect to AWS S3. + // 2. S3 using the MD5 hash of the file for its ETag cache header. + // 3. The file being small enough to fit in memory. + // + // Note that if assets are large (5GB) assumption 2 is not correct. See + // https://github.com/getsentry/craft/issues/322#issuecomment-964303174 let response; try { response = await this.github.request(`HEAD ${url}`, {