Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions generator/.DevConfigs/c49077d9-90b3-437f-b316-6d8d8833ae73.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"services": [
{
"serviceName": "S3",
"type": "patch",
Copy link

Copilot AI Nov 6, 2025

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) on TransferUtilityDownloadDirectoryResponse, 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.

Copilot generated this review using guidance from repository custom instructions.
"changeLogMessages": [
"Populate TransferUtilityDownloadDirectoryResponse with total objects downloaded"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

int numberOfFilesDownloaded = _numberOfFilesDownloaded;

};
}
finally
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ObjectsDownloaded property is not accessible to API consumers because the public DownloadDirectoryAsync and DownloadDirectory methods do not return the response object. The internal command returns TransferUtilityDownloadDirectoryResponse, but the public API methods have return type Task (async) or void (sync), discarding the response.

To make this property useful, the public API signatures should be updated to return Task<TransferUtilityDownloadDirectoryResponse> and TransferUtilityDownloadDirectoryResponse respectively. If this is planned for a future change, consider documenting this as work-in-progress. If the API signature cannot be changed due to backward compatibility, consider an alternative mechanism to expose this information.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be done in future pr

}
}