-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SVC-3061] feat: add S3 cache functionality #104
base: master
Are you sure you want to change the base?
Conversation
cache/network/download_s3.go
Outdated
matchedKey = keyFound | ||
firstValidKey = keyFound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 🙂🎉 |
No description provided.