-
Notifications
You must be signed in to change notification settings - Fork 872
Populate TransferUtilityDownloadDirectoryResponse with total objects downloaded #4109
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
base: feature/transfermanager
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "services": [ | ||
| { | ||
| "serviceName": "S3", | ||
| "type": "patch", | ||
| "changeLogMessages": [ | ||
| "Populate TransferUtilityDownloadDirectoryResponse with total objects downloaded" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -108,12 +108,16 @@ await asyncThrottler.WaitAsync(cancellationToken) | |||
| var command = new DownloadCommand(this._s3Client, downloadRequest); | ||||
|
|
||||
| var task = ExecuteCommandAsync(command, internalCts, asyncThrottler); | ||||
|
|
||||
| pendingTasks.Add(task); | ||||
| } | ||||
| await WhenAllOrFirstExceptionAsync(pendingTasks, cancellationToken) | ||||
| .ConfigureAwait(continueOnCapturedContext: false); | ||||
|
|
||||
| return new TransferUtilityDownloadDirectoryResponse(); | ||||
| return new TransferUtilityDownloadDirectoryResponse | ||||
| { | ||||
| ObjectsDownloaded = _numberOfFilesDownloaded | ||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. _numberOfFilesDownloaded is an existing value that gets updated in the download progress callback aws-sdk-net/sdk/src/Services/S3/Custom/Transfer/Internal/DownloadDirectoryCommand.cs Line 61 in 7d4200a
|
||||
| }; | ||||
| } | ||||
| finally | ||||
| { | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,5 +22,9 @@ namespace Amazon.S3.Transfer | |
| /// </summary> | ||
| public class TransferUtilityDownloadDirectoryResponse | ||
| { | ||
| /// <summary> | ||
| /// The number of objects that have been downloaded | ||
| /// </summary> | ||
| public long ObjectsDownloaded { get; set; } | ||
|
Comment on lines
+25
to
+28
|
||
| } | ||
| } | ||
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.
The dev config specifies this as a "patch" change, but this introduces a new public property (
ObjectsDownloaded) onTransferUtilityDownloadDirectoryResponse, which is a new feature. According to CONTRIBUTING.md guidelines, new features should be marked as "minor" rather than "patch".Additionally, if the public API signatures are updated to return the response object (which would be necessary to make this property accessible), that would also constitute a minor version change as it's a backward-compatible API enhancement.