-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[Storage] [DataMovement] Fixed Preservation during Directory Overwrite #52002
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
[Storage] [DataMovement] Fixed Preservation during Directory Overwrite #52002
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 fixes property/permission/metadata preservation during directory overwrite operations for SMB and NFS storage resources. The main issue was that when overwriting existing directories, the source properties were not being properly applied to the destination.
- Fixed directory creation logic to support overwrite mode with property preservation
- Added comprehensive test coverage for directory overwrite scenarios with SMB and NFS protocols
- Added OAuth authentication tests for NFS operations
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| TransferJobInternal.cs | Updated directory creation to use new overwrite-aware CreateAsync method |
| StorageResourceContainer.cs | Added new virtual CreateAsync method supporting overwrite with source properties |
| ShareDirectoryStorageResourceContainer.cs | Implemented overwrite logic with metadata/properties preservation |
| DataMovementSharesExtensions.cs | Renamed method for clarity (GetFilePermission → GetDirectoryPermission) |
| ShareFileStorageResource.cs | Added new error message for directory overwrite conflicts |
| ClientBuilderExtensions.cs | Added OAuth NFS test client builder method |
| ShareFileStartTransferCopyTests.cs | Added overwrite tests for file transfers and OAuth NFS tests |
| ShareDirectoryStartTransferCopyTests.cs | Added comprehensive directory overwrite tests for both SMB and NFS |
| assets.json files | Updated test asset tags |
...torage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs
Outdated
Show resolved
Hide resolved
sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Fixed property/permission/metadata preservation when overwriting an existing directory. This applies to SMB and NFS. Also added some OAuth tests for NFS.