Error description:
If I try to upload a blob that has an active lease on it, the behavior of Azurite differs from the real blob storage.
Azurite returns a BlobAlreadyExists while the real storage returns LeaseIdMissing.
Azurite returns LeaseIdMissing only if overwrite=True.
The behavior difference exists in the latest supported API version (2025-11-05) and in the latest API.
Reproduction (Python SDK v12.28.0):
Azurite no overwrite:
blob_service= BlobServiceClient.from_connection_string("UseDevelopmentStorage=true", api_version="2025-11-05")
blob_client = blob_service.get_blob_client("foo", "bar")
blob_client.upload_blob(b"")
blob_client.acquire_lease(90)
blob_client.upload_blob(b"foobar") # --> raises ResourceExistsError
Azurite overwrite:
blob_service= BlobServiceClient.from_connection_string("UseDevelopmentStorage=true", api_version="2025-11-05")
blob_client = blob_service.get_blob_client("foo", "bar")
blob_client.upload_blob(b"", overwrite=True)
blob_client.acquire_lease(90)
blob_client.upload_blob(b"foobar") # --> raises LeaseIdMissing
Real storage no overwrite:
blob_service= BlobServiceClient.from_connection_string("<real_connection_string>", api_version="2025-11-05")
blob_client = blob_service.get_blob_client("foo", "bar")
blob_client.upload_blob(b"")
blob_client.acquire_lease(90)
blob_client.upload_blob(b"foobar") # --> raises LeaseIdMissing
Error description:
If I try to upload a blob that has an active lease on it, the behavior of Azurite differs from the real blob storage.
Azurite returns a
BlobAlreadyExistswhile the real storage returnsLeaseIdMissing.Azurite returns
LeaseIdMissingonly ifoverwrite=True.The behavior difference exists in the latest supported API version (2025-11-05) and in the latest API.
Reproduction (Python SDK v12.28.0):
Azurite no overwrite:
Azurite overwrite:
Real storage no overwrite: