Azurite
Azurite copied to clipboard
Metadata Vanishing
Which service(blob, file, queue, table) does this issue concern?
blob
Which version of the Azurite was used?
3.31
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
Npm and Visual Studio code
What's the Node.js version?
20.14
What problem was encountered?
This is a really curious issue with metadata. As soon as I iterate over blob containers in code metadata vanish. I don't know if it's a problem with Azurite Emulator or if the java lib is buggy. I tracked it down just to this iteration. No other operations done. Also opened issue with azure spring boot https://github.com/microsoft/spring-cloud-azure/issues/1063
Steps to reproduce the issue?
- Install and run Azurite
- Install and open Microsoft Azure Storage explorer
- Open "Emulator & Attached" - Storage Accounts - Emulator - Blob containers
- Create a container
- right click properties
- add metadata
- use spring boot BlobServiceClient to iterate over paged response blobcontaineritem
- After that metadata is gone Could be any party involved losing it. Thought I try here for investigation
public Map<String, ConfigType> getConfigTypes() { Map<String, ConfigType> configTypes = new HashMap<>(); PagedIterable<BlobContainerItem> blobContainerItemPages = blobServiceClient.listBlobContainers(); Iterator<PagedResponse<BlobContainerItem>> iterator = blobContainerItemPages.iterableByPage().iterator(); while (iterator.hasNext()) { PagedResponse<BlobContainerItem> blobContainerItems = iterator.next(); processBlobContainerItems(blobContainerItems, configTypes); } return configTypes; } private void processBlobContainerItems(PagedResponse<BlobContainerItem> blobContainerItems, Map<String, ConfigType> configTypes) { for (BlobContainerItem blobContainerItem : blobContainerItems.getValue()) { BlobContainerClient blobContainerClient = blobServiceClient .getBlobContainerClient(blobContainerItem.getName()); List<String> versions = getBlobVersions(blobContainerClient); String latestVersionString = getLatestVersionString(versions); String description = getDescription(blobContainerItem); String title = getTitle(blobContainerItem); ConfigType configType = createConfigType(title, latestVersionString, versions, description); configTypes.put(blobContainerItem.getName(), configType); } }
If possible, please provide the debug log using the -d parameter, replacing <pathtodebuglog> with an appropriate path for your OS, or review the instructions for docker containers:
-d "<pathtodebuglog>"
Please be sure to remove any PII or sensitive information before sharing!
The debug log will log raw request headers and bodies, so that we can replay these against Azurite using REST and create tests to validate resolution.