Skip to content

Commit

Permalink
Improve comment of assumptions on getting checksum
Browse files Browse the repository at this point in the history
  • Loading branch information
iker-barriocanal committed Nov 17, 2021
1 parent 4c889a7 commit 477308a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/targets/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,13 @@ export class GithubTarget extends BaseTarget {
}

private async checksumFromUrl(url: string): Promise<string> {
// 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}`, {
Expand Down

0 comments on commit 477308a

Please sign in to comment.