-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[BUG] Blob Storage: GetBlockList should throw if conditions other than LeaseId is specified #19770
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. Issue DetailsDescribe the bug
Expected behavior Actual behavior (include Exception or Stack Trace) BTW, any reason why Get Block List doesn't support ETag, forcing me to do it manually at client side?
|
@seanmcc-msft @kasobol-msft Should we be throwing exceptions when the user is specifying headers in the Also should we look to making another Options bag specifically for APIs like this that don't take in certain headers like the rest do? That way the our APIs and options bags reflect what the service supports. What are you trying to achieve with using this header with |
there are three ways user can learn that they're doing something wrong:
I think 1. is not viable at this point as it will end up being explosion of models in the sdk, which leaves 2. But I guess it's not only that API. |
@amnguye, I would prefer not to do this, it would add additional complexity that we need to weigh the tradeoffs for. Lets sync offline and get back to this thread. |
I don't have all the details, but my team has a framework built on top of Azure Storage, and after we have a Blob we use ETag for every operation to guarantee we don't have concurrency issues. |
I think 2 is good enough. Although the validation will happen at runtime, it will happen immediately at first call with the wrong parameters, so the developer will discover it very quickly, and most important before it goes to prod. UPDATE: It depends what are the goals of the SDK, if it is only a wrapper over HTTP calls. Or a SDK that .NET Developer can rely without actively reading HTTP Rest API docs. If it is the latter, I would try to do as much validation as possible and put the developer in the right direction 3-) Developer may never find out what is wrong with their code. In a real world application, the GetBlockList call is only one of the places where you can have concurrency issues, and given it accepts a AccessCondition it would be one of the last places I would investigate. |
Do you know why https://docs.microsoft.com/en-us/rest/api/storageservices/get-block-list#request doesn't support access condition headers? I'd like to understand if I'm doing something wrong. |
I would take this question to https://azure.microsoft.com/en-us/support/community/ Apologies in advance for the redirection, but this is due to the face that this is the repo of the SDK, and not where you can ask for feature requests from the service. The SDK simply supports what the service can support and provides as much conveniences to the user, as much as the service supports. |
Hi @felipepessoto, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Any updates about making the change number 2? validation checks (feedback deferred to runtime, still easy to discover, but might be annoying) |
Actually this feature request was completed via this PR. Looks like we didn't close this issue cause it fell through the cracks. Apologies about that. |
This should be apart of Azure.Storage.Blobs version 12.11.0 But I recommend to at least upgrading to 12.13.0 to avoid a known vulnerability. |
Describe the bug
If you specify IfMatch(ETag), this method silently ignores it.
azure-sdk-for-net/sdk/storage/Azure.Storage.Blobs/src/BlockBlobClient.cs
Line 2054 in 2c0cc4e
Expected behavior
Throw exception, saying the ETag or any other condition doesn't work for this API.
Actual behavior (include Exception or Stack Trace)
Returns the list of blocks. Making me believe I don't have a concurrency problem.
BTW, any reason why Get Block List doesn't support ETag, forcing me to do it manually at client side?
https://docs.microsoft.com/en-us/rest/api/storageservices/get-block-list#request
The text was updated successfully, but these errors were encountered: