Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.48k stars 4.81k forks source link

[BUG] EncryptionContext property missing in DataLakeFileUploadOptions for Upload method #35239

Open yifanz0 opened 1 year ago

yifanz0 commented 1 year ago

Library name and version

Azure.Storage.Files.DataLake 12.14.0-beta.1

Describe the bug

DataLakeFileUploadOptions for the upload method is missing the property EncryptionContext https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeFileUploadOptions.cs#L12

Currently in order to set EncrypionContext, customers have to call Create method (which supports setting EncryptionContext) and then Append & Flush the content by chunks manually. We've tried Create + Upload, but the upload method would overwrite EncryptionContext to null. As upload method is supposed to create and upload the content, it should support EncryptionContext in the properties

Expected behavior

Users should be able to set EncryptionContext when using Upload method.

Actual behavior

Users are not able to set EncryptionContext when using Upload method https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Azure.Storage.Files.DataLake/src/Models/DataLakeFileUploadOptions.cs#L12

Reproduction Steps

Create and upload a new datalake gen2 item using the upload method https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/Azure.Storage.Files.DataLake/src/DataLakeFileClient.cs#L3863

Environment

No response

github-actions[bot] commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

navba-MSFT commented 1 year ago

Adding Service team to look into this.

github-actions[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @sumantmehtams.