Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.83k stars 325 forks source link

The response returned in Azurite doesn't contain versionId when create append blob #811

Open zzhxiaofeng opened 3 years ago

zzhxiaofeng commented 3 years ago

Error Description: The response returned in Azurite doesn't contain versionId when create append blob.

To Reproduce: Please run the demo code as following:

import { BlobServiceClient, StorageSharedKeyCredential } from "@azure/storage-blob";
import { assert } from "chai";

async function main() {
    const blobServiceClient = new BlobServiceClient("<Azurite-https-endpoint>", new StorageSharedKeyCredential("<account-name>", "<account-key>"));
    const containerClient = blobServiceClient.getContainerClient("<container-name>");
    await containerClient.create();
    const appendBlobClient = containerClient.getAppendBlobClient("<blob-name>");
    const appendCreateRes = await appendBlobClient.create();
    assert.ok(appendCreateRes.versionId);
}

main();

Error Track: https://github.com/Azure/Azurite/blob/master/src/blob/handlers/AppendBlobHandler.ts#L84 image The response of append blob creation doesn't contain versionId.

Expected Behavior: The response returned in Azurite contains versionId when create append blob.

@jongio for notification.

blueww commented 3 years ago

@zzhxiaofeng

Thanks for reporting this issue! Blob version is still not supported in Azurite.

Azurite welcome contribution. It would be great if you could raise a PR to fix it!