-
Notifications
You must be signed in to change notification settings - Fork 875
DownloadDirectory Initiated, Failed and Completed Events #4176
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?
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.
Pull request overview
This PR adds directory-level lifecycle events (Initiated, Completed, Failed) to the S3 TransferUtility's DownloadDirectory operation, providing developers with better visibility into the overall download directory process. It also includes minor adjustments to when lifecycle events are fired in related operations.
- Addition of three new event types with progress information for download directory operations
- Comprehensive integration tests validating the new event functionality
- Event firing order adjustments in SimpleUploadCommand and DownloadCommand for consistency
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryRequest.cs | Adds three new public events (Initiated, Completed, Failed) and corresponding event args classes with progress tracking |
| sdk/src/Services/S3/Custom/Transfer/Internal/DownloadDirectoryCommand.cs | Implements event firing methods and integrates them into the download execution flow |
| sdk/src/Services/S3/Custom/Transfer/Internal/_bcl+netstandard/DownloadDirectoryCommand.cs | Wraps execution in try-catch to fire events at appropriate lifecycle points (start, success, failure) |
| sdk/src/Services/S3/Custom/Transfer/Internal/_async/SimpleUploadCommand.async.cs | Moves FireTransferInitiatedEvent before AsyncThrottler.WaitAsync for consistent event timing |
| sdk/src/Services/S3/Custom/Transfer/Internal/_async/DownloadCommand.async.cs | Moves FireTransferInitiatedEvent before ValidateRequest for consistent event timing |
| sdk/test/Services/S3/IntegrationTests/TransferUtilityDownloadDirectoryLifecycleTests.cs | Comprehensive integration test suite covering all three new events and their behavior |
| generator/.DevConfigs/9d07dc1e-d82d-4f94-8700-c7b57f872124.json | Dev config marking the changes as a minor version bump with appropriate changelog |
| generator/.DevConfigs/9d07dc1e-d82d-4f94-8700-c7b57f872123.json | Updates changelog message for consistency with new naming convention |
| sdk/global.json | Adds SDK version specification (8.0.415) |
sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadDirectoryRequest.cs
Show resolved
Hide resolved
sdk/test/Services/S3/IntegrationTests/TransferUtilityDownloadDirectoryLifecycleTests.cs
Outdated
Show resolved
Hide resolved
c675340 to
ec52c07
Compare
| { | ||
| ValidateRequest(); | ||
|
|
||
| FireTransferInitiatedEvent(); |
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.
moved this to the top just to be consistent
ec52c07 to
6af787d
Compare
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.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
sdk/test/Services/S3/IntegrationTests/TransferUtilityDownloadDirectoryLifecycleTests.cs
Outdated
Show resolved
Hide resolved
sdk/test/Services/S3/IntegrationTests/TransferUtilityDownloadDirectoryLifecycleTests.cs
Show resolved
Hide resolved
6af787d to
e84bfc2
Compare
Description
ObjectDownloadedFailedEventfrom add failure policy to download directory #4151 (see explanation below)ObjectDownloadFailedEvent:
DownloadDirectoryFailedEvent:
Key Scenarios:
With "Continue on Failure" policy:
ObjectDownloadFailedEventfires for each oneDownloadDirectoryFailedEventdoes NOT fire (operation succeeded overall)With "Abort on Failure" policy:
ObjectDownloadFailedEventfiresDownloadDirectoryFailedEventalso firesPre-download failures (validation, listing S3 objects, etc.):
DownloadDirectoryFailedEventfiresObjectDownloadFailedEventnever fires because no specific file failedThe important distinction is:
ObjectDownloadFailedEventis about individual file failures, whileDownloadDirectoryFailedEventis about the overall operation failing.Motivation and Context
To comply with the SEP.
Testing
Types of changes
Checklist
License