[SVC-3061] feat: add S3 cache functionality#104
Open
nagypeterjob wants to merge 13 commits intomasterfrom
Open
[SVC-3061] feat: add S3 cache functionality#104nagypeterjob wants to merge 13 commits intomasterfrom
nagypeterjob wants to merge 13 commits intomasterfrom
Conversation
cache/network/download_s3.go
Outdated
Comment on lines
94
to
95
| matchedKey = keyFound | ||
| firstValidKey = keyFound |
There was a problem hiding this comment.
Cannot we drop 1 of these variables as they always have the same value?
cache/network/download_s3.go
Outdated
| return fmt.Errorf("creating file: %w", err) | ||
| } | ||
| defer file.Close() //nolint:errcheck | ||
| body, err := io.ReadAll(result.Body) |
There was a problem hiding this comment.
These objects can be quite large (gigabytes+). We should either read the body in fix sized chunks, writing to file simultaneously or use a library that does this for us (the S3 client might have such a method available, I haven't checked).
Without this, the build VM can go out of memory easily.
|
Nice work Peti as always! Left 1 nitpick and 1 change request, otherwise lgtm! 🙂🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.