-
Notifications
You must be signed in to change notification settings - Fork 495
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
[Client encryption]: Drops RentArrayBufferWriter #4847
base: master
Are you sure you want to change the base?
[Client encryption]: Drops RentArrayBufferWriter #4847
Conversation
…tps://github.com/juraj-blazek/azure-cosmos-dotnet-v3 into users/juraj-blazek/encryption-benchmark-baseline
…encryption-array-pooling
…encryption-array-pooling
~ reduce validations overhead
~ update api file
+ tests + Stream provided benchmarks via RecyclableMemoryStream
…rentarraybufferwriter
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@JanHyka please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@@ -43,6 +43,7 @@ | |||
|
|||
<ItemGroup Condition=" '$(IsPreview)' == 'True' "> | |||
<PackageReference Include="Microsoft.Data.Encryption.Cryptography" Version="2.0.0-pre007" /> | |||
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" /> |
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.
RecyclableMemoryStream is outside of Azure core has allowed list of dependencies.
One options is to inline the code as Jan has before.
https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-dependencies
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.
I can see where that requirement comes from... to avoid dependency hell. The question is whether avoiding one evil doesn't invite much greater one instead:
- Copypasted code leads to bloating of code base and rises maintenance costs
- Nobody maintains it or keeps it up to date (or rather, nobody can afford to)
- Security issues within original code will be entirely missed in such copies. While affected library gets marked by security tools (or .NET9 analyzers that catch those already at compile), hidden copy will go unnoticed... until it gets exploited.
I am not saying referencing some random 3rd party library would be a good idea, otoh entirely blacklisting pretty much everything including Microsoft.* doesn't seem neither safe nor future proof either. Might be worth consideration.
Pull Request Template
Description
This PR drops RentArrayBufferWriter and uses RecyclableMemoryStream 3.0.1 instead (it has both Stream and IBufferWriter functionality so it's pretty much ideal for our use case).
To be processed after #4846
Type of change
Please delete options that are not relevant.
Closing issues
Contributes to #4678