feat: S3 transfer manager improvements#3247
feat: S3 transfer manager improvements#3247yenfryherrerafeliz wants to merge 22 commits intoaws:masterfrom
Conversation
Until phpunit10 support is release we must use annotations for covers and dataProvider within tests.
- Address some formatting issues. - Fixed arguments passed to ResumableDownload - Add test coverage for: - DirectoryProgressTracker - DirectoryTransferProgressAggregator - DirectoryTransferProgressSnapshot - DirectoryDownloader - DirectoryUploader
|
stobrien89
left a comment
There was a problem hiding this comment.
Just a few more questions/comments
| * | ||
| * @return bool | ||
| */ | ||
| private function writePartToDestinationHandle(array $response): bool |
There was a problem hiding this comment.
Question: do part numbers start at 1 or 0? If zero, I think this might be exposed to an off-by-one error
There was a problem hiding this comment.
Part numbers start at 1 actually.
| $this->body->rewind(); | ||
| } | ||
|
|
||
| $partNo = 0; |
There was a problem hiding this comment.
Does resume data store 1-based part numbers? Might be a mismatch during resume skip logic
There was a problem hiding this comment.
$partNo is incremented at line 388, which will unlikely cause a resumable
persist mismatch. Is there any other mismatch you are referring to here, that I
may be missing?
| $chunk = $body->read(self::READ_BUFFER_SIZE); | ||
|
|
||
| if (fwrite($this->handle, $chunk) === false) { | ||
| throw new FileDownloadException("Failed to write data to temporary file."); |
There was a problem hiding this comment.
question: where do these exceptions bubble up to?
- Add validation for when resuming an upload and the source file changed - Add test coverage for the behavior when resuming upload and source file changed - Address some styling issues
stobrien89
left a comment
There was a problem hiding this comment.
A couple more comments. Thanks for making the changes to the CBOR tests also
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.