Closed jfurmankiewiczpros closed 1 month ago
@jfurmankiewiczpros is this an upgrade related issue similar to #33671, or is this from initial usage of Azurite? If it's the latter this may be a case where Azurite doesn't have support for this yet: https://github.com/Azure/Azurite#support-matrix
This also appears to be similar to, or the same as, https://github.com/Azure/azure-sdk-for-java/issues/31776
No, this is not related to the upgrade. It's just that as a result of #33671 , we added more JUnit test coverage and now test our entire suite across both actual Azure blob storage AND Azurite, to guard against any SDK regressions.
So this appeared only once we run existing tests against Azurite connection.
This bug must have been there a long time, we were just lucky not to hit it in any production code yet, looks like none of our apps have used query by blog in production code yet, only in test code.
Yeah, this is an interesting case as Azurite doesn't support Blob Tags (basing on this issue not being closed: https://github.com/Azure/Azurite/issues/1312) and mention of it in their support matrix:
But instead of returning an exception status code, like a 501 Not Implemented, it returns an invalid response body that leads to an NPE. And I'm not sure guarding here is the right option as the response body should be properly formatted.
That is a tricky one, I admit. That sounds like a pretty important gap. I was not aware of these gaps, I presumed the Azurite emulator is fully featured.
I guess you could detect the SDK is connected to localhost or 0.0.0.0 host, assume it is Azurite and handle it differently?
Throwing the NPE lays the blame on the SDK, when it is not really the case.
Maybe throwing an InvalidOperationException with a message like "Invalid response, blob tags not supported" or something like that would be more helpful in guiding the developers to the root cause?
connect to Azurite emulator running locally
Hi, I would suggest to use Testcontainers. #40388 shows how to use it in order to have an automated test.
Closed, Azurite added the requested feature.
Describe the bug
Running integration tests against Azurite emulator. When issuing query to find blobs by tags, the SDK throws a NullPointerException. The same code works fine if connected to an actual Azure blob storage account.
There are obviously some subtle differences between Azure blob storage and Azurite that the SDK is not handling.
Exception or Stack Trace
To Reproduce
Code Snippet
Expected behavior
Should not throw NPE.
Setup (please complete the following information):
Additional context
Makes it impossible to test logic that queries blobs by tag when using Azurite for local integration tests.
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report