Azure / Azure/azure-cli

az storage blob upload - early fail on overwrite error

Open
#25,019 2 comments 0 reactions 2 assignees Claimed by @calvinhzy View on GitHub
act-codegen-extensibility-squad Auto-Assign Azure CLI Team customer-reported feature-request Storage
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

It is quite reasonable that the tool reports an error at the start of the upload. That is the primary use case. It is very unexpected that the file will be removed during the upload. More likely the user is uploading a blob and is unaware of that it already exists. It is therefore better not to waste resources on uploading data that will be discarded.

An example:

```
trainer:/workdir/model# az storage blob upload -c models --file model.onnx --name p11808/model.onnx
Finished[#############################################################] 100.0000%
The specified blob already exists.
RequestId:1401d725-501e-0046-56b1-1e54bb000000
Time:2023-01-02T13:54:11.9826631Z
ErrorCode:BlobAlreadyExists
If you want to overwrite the existing one, please add --overwrite in your command.
trainer:/workdir/model#
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.