-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Update s3manager's iface with missing methods #2612
Conversation
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.
Thanks for taking the time to create this PR @alexieyizhe. I think this is the right approach for this API. But I don't think we need to create interfaces for the constructor functions, just the methods.
Similar like the following.
type UploadWithIterator interface {
UploadWithIterator(aws.Context, s3manager.BatchUploadIterator, ...func(*s3manager.Uploader)) error
}
type DownloadWithIterator interface {
DownloadWithIterator(aws.Context, s3manager.BatchDownloadIterator, ...func(*s3manager.Downloader)) error
}
type BatchDeleter interface {
Delete(aws.Context, s3manager.BatchDeleteIterator) error
}
I think the CI tests are failing due to Go formatting issues. Maybe try using |
@jasdel that explains the tests, thank you :) Are you referring to the |
Correct, I was referring to the |
I was under the impression an interface would be needed for all the functions that were exposed in order to mock them out. Is this not the case? I'm not the most familiar with the sdk or Go so it may very well be that they're not needed. |
Hey @jasdel I've addressed the feedback you've given (appreciate it!) |
Thanks for the update @alexieyizhe, we'll review this update and get back with your with our feedback. Thanks! |
Adds PR #2612 to pending change log
Adds the missing interface and methods from the `s3manager` Uploader, Downloader, and Batch Delete utilities.
Adds PR aws#2612 to pending change log
This addresses #2273 and adds some new methods on top of it:
NewDownloader
NewDownloaderWithClient
NewUploader
NewUploaderWithClient
that were missing in the interface before.
It was suggested in #2273 that since this interface was not autogenerated and had no warning, the methods should be added as separate interfaces that can be composed together by the user to avoid breaking when the API changes.