Skip to content
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

DataMovement migration guide samples #47934

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jaschrep-msft
Copy link
Member

Side by side samples for common functionality in legacy vs modern Data Movement.

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Jan 22, 2025
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jaschrep-msft jaschrep-msft force-pushed the datamovement-migrationguide-samples branch from 792e671 to 723b03f Compare January 22, 2025 19:01
Copy link
Member

@amnguye amnguye left a comment

Choose a reason for hiding this comment

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

Had a few draft comments, otherwise looking good!

```csharp
// these values provided by your code
string filePath, blobUri;
LocalFilesStorageResourceProvider files;
Copy link
Member

Choose a reason for hiding this comment

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

can remove this line now and update below to be
LocalFilesStorageResourceProvider.FromFile(filePath)

Copy link
Member

Choose a reason for hiding this comment

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

Same for the rest for FromDirectory as well

{
BlobDirectoryPrefix = blobDirectoryPath,
}));
await operation.WaitForCompletionAsync();
Copy link
Member

Choose a reason for hiding this comment

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

In track 1, does calling UploadDirectoryAsync, actually wait the entire transfer?

Copy link
Member Author

Choose a reason for hiding this comment

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

as far as i can tell, it gives you a task for transfer completion. I don't know this for certain yet, but other things also don't make sense to me if i'm wrong

Copy link
Member

Choose a reason for hiding this comment

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

From what I could tell when writing perf tests, it does. There is no other way to wait


In the legacy data movement library, it was possible to check a report of how many files
were or were not transferred in a directory transfer, as shown below. This is no
longer supported in the modern library. Applications will need to enable progress reporting
Copy link
Member

Choose a reason for hiding this comment

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

Maybe instead of saying it's no longer supported, maybe something along the lines of in the modern library you have to opt-in and enable progress reporting through ProgressHandlerOptions to make it sound more like, we do support this scenario still, it just shows up very differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants