question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az storage blob upload not overwriting / issue with entity

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command az storage blob upload -f <path-to-file> --account-name <storage-account> -c dev -n <path-to-upload-in-container> --overwrite true --% --sas-token "sp=racwdlmeop&st=2022-09-05T03:56:59Z&se=2022-10-01T11:56:59Z&spr=https&sv=2021-06-08&sr=c&sig=[redacted]"

Describe the bug and To Reproduce My goal has been to dynamically create a directory and upload a file to it. The name of directory is set using pscore with ${date} = Get-Date -Format "yyyy/MM/dd" so that the directory of my file and path to directory in blob would be 2022/09/05/file.txt. az config set extension.use_dynamic_install=yes_without_prompt So I can use storage-preview as it asks for it. az storage fs directory create -n dev/${date} -f dev --account-name $(StorageAccount) --% --sas-token "$(SASToken)" The --% as the SAS token in ps thinks it a command otherwise. Then do the upload command gives:

Argument '--overwrite' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The requested operation is not allowed in the current state of the entity.
RequestId:7df8fed3-901e-0024-7fdc-c04548000000
Time:2022-09-05T04:01:03.3425146Z
ErrorCode:OperationNotAllowedInCurrentState
If you want to overwrite the existing one, please add --overwrite in your command.

Expected behavior It will say you need to overwrite yet the overwrite is in it already and the permissions for the SAS token are all permissions and the date is set to at least a month away so will not expire.

Environment summary

azure-cli                         2.39.0

core                              2.39.0
telemetry                          1.0.6 *

Extensions:
azure-devops                      0.25.0
storage-preview                    0.8.3

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

These are my local versions but ideally I’m aiming to use azure-pipeline for this.

Additional context I feel like it’s an overwrite issue but could be SAS issue although I don’t think I’m generating it wrong. I’ve chosen all permissions multiple times and made sure date won’t expire. I also have Storage blob owner and contributor to the storage account. In Azure-pipeline I have to use ubuntu vm for this so either bash or pscore I can use for this but unsure.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
navba-MSFTcommented, Oct 31, 2022

@Smoogles The action is currently pending on you to share the RequestId from the error response of most recent issue occurrence. Once you have these details, please feel free to reopen this issue, we would be happy to help.

1reaction
Smooglescommented, Oct 22, 2022

Sorry been busy. Can I get back to you start of this week coming? I’ll try again when at work and will send it through.

Thanks

On Fri, 21 Oct 2022, 1:54 pm navba-MSFT, @.***> wrote:

@Smoogles https://github.com/Smoogles I wanted to do quick follow-up to check if you had a chance to look at my above comment. Please share the RequestId from the error response of most recent issue occurrence. Awaiting your reply.

— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-cli/issues/23783#issuecomment-1286424352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL7FVURB5XMYICDJS2S744TWEIHX5ANCNFSM6AAAAAAQETZNZI . You are receiving this because you were mentioned.Message ID: @.***>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't Overwrite Azure Blob Storage - Stack Overflow
By design, Azure Blob Storage will overwrite the contents of a blob if you're trying to upload new content with same blob name....
Read more >
Azure Storage Explorer troubleshooting guide - Microsoft Learn
Here are some strategies to get Azure RBAC working optimally in Storage Explorer. How do I access my resources in Storage Explorer? If...
Read more >
Failure to Overwrite Files in Blob Storage
This issue began in March 2022 when Microsoft changed the default behavior of az storage blob upload on March 3, 2022 so that...
Read more >
azure.storage.blob package - NET
account_url (str) – The URL to the blob storage account. Any other entities included in the URL path (e.g. container or blob) will...
Read more >
Buckets overview - Amazon Simple Storage Service
To upload your data (photos, videos, documents, etc.) to Amazon S3, you must first create an S3 bucket in one of the AWS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found