microsoft / AzureStorageExplorer

Easily manage the contents of your storage account with Azure Storage Explorer. Upload, download, and manage blobs, files, queues, tables, and Cosmos DB entities. Gain easy access to manage your virtual machine disks. Work with either Azure Resource Manager or classic storage accounts, plus manage and configure cross-origin resource sharing (CORS) rules.
Creative Commons Attribution 4.0 International
377 stars 86 forks source link

Rename shortcut should be disabled for non-HNS blob containers #8056

Closed tjohnson1010 closed 1 month ago

tjohnson1010 commented 4 months ago

Preflight Checklist

Storage Explorer Version

1.34.0 (99)

Regression From

No response

Architecture

x64

Storage Explorer Build Number

20240532.2

Platform

Windows

OS Version

Windows 11

Bug Description

When renaming a blob, it creates a new file with the new name but doesn't remove the old file.

Steps to Reproduce

  1. Launch Storage Explorer
  2. Go to any Blob Container
  3. Click an file.
  4. Press F2
  5. Enter new name and click Enter

Actual Experience

Two files exist, one with old name and one with new name.

Expected Experience

Only one file should exist with the new name.

Additional Context

This feature works with files in File Shares but not Blob Containers

craxal commented 3 months ago

@tjohnson1010 You're using ADLS Gen2 Blob Storage, right? This seems odd, as we are using a move function provided by the Azure SDK. Do you get any error messages at all? Does this happen consistently?

tjohnson1010 commented 3 months ago

No error and happens all the time.

Below are settings for the two I teste with. One was gen1 the other gen2. I rarely use rename with Blob containers, so no big deal. I use rename mostly with file shares and that works 100%.

FIRST Storage: (doesn’t work) @. @.

SECOND Storage: (doesn’t work) @. @.

1 of many File Share I use this on: (works) @. @.

Have a good day,

Thomas Johnson Director of IT Applications

Phone: 630.242.3385 @.**@.> | www.legacyscs.comhttps://legacyscs.com/

distribution | fulfillment | transportation

This confidential e-mail and any attachments are for the exclusive use of the addressee(s). If you receive this in error, please delete all copies and notify the sender. Any views expressed are those of the sender, unless stated otherwise.

From: Craig Alvord @.> Sent: Friday, July 12, 2024 11:28 AM To: microsoft/AzureStorageExplorer @.> Cc: Thomas Johnson @.>; Mention @.> Subject: Re: [microsoft/AzureStorageExplorer] Rename of Blob make new file and leaves original file behind when Access Tier is Hot (Issue #8056)

This is an EXTERNAL email. Exercise caution. DO NOT open attachments or click links from unknown senders or unexpected email.

@tjohnson1010https://github.com/tjohnson1010 You're using ADLS Gen2 Blob Storage, right? This seems odd, as we are using a move function provided by the Azure SDK. Do you get any error messages at all? Does this happen consistently?

— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/AzureStorageExplorer/issues/8056#issuecomment-2225926349, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBXDC7O6I4R34EFLFZWLF3ZL772VAVCNFSM6AAAAABKXRKA2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRVHEZDMMZUHE. You are receiving this because you were mentioned.Message ID: @.**@.>>

craxal commented 3 months ago

@tjohnson1010 Were you trying to post screenshots? Can you try again using the GitHub website? You can't do it replying via email.

tjohnson1010 commented 3 months ago

No I pasted info about the types of Blobs I've tested with. One was gen2 the other was gen1. Both had same behavior.

craxal commented 3 months ago

The move operation does not appear to have a corresponding REST API, so it could be a bug in the Azure client SDK.

Can you do the following:

  1. Launch Storage Explorer.
  2. Reproduce the issue.
  3. Share the app logs?

You can also try using a network monitoring app to capture the actual REST APIs that Storage Explorer uses and see if there are any error responses that come back.

tjohnson1010 commented 3 months ago

OK. I see what is happening now. I notice under Blobs there is no Rename option. It only exists for File Shares. But The F2 key exists for both types. For File Shares it does rename but for Blobs it's doing a Copy (the pop-up states Clone Blob). There is no Rename feature for Blob. To be consistent with other MS apps, like Explorer, F2 shouldn't do anything for Blob since it doesn't support Rename.

craxal commented 3 months ago

@tjohnson That's not quite true. ADLS Gen2 blobs allow for hierarchical namespaces (real folders, just like file shares). So, Rename/Move is a perfectly valid operation.

Here's an ADLS Gen2 blob container's toolbar:

image

And here's a non-ADLS Gen2 blob container's toolbar:

image

I should note that ADLS Gen1 is retired as of February 2024. So, maybe you're referring to something else when you mentioned Gen1 earlier?

tjohnson1010 commented 3 months ago

I see now I had Account kind of General Purpose V2 Type and Hierarchical namespace disabled. So ADLS wasn't enabled. I'm ok with no Rename on non ADLS, just the F2 having different functionality for the different toolbars threw me for a loop.

craxal commented 3 months ago

@tjohnson1010 You make a very good point. Keyboard shortcuts should be consistent. We'll review as a team and address as necessary.

craxal commented 1 month ago

Just for clarity, F2 will rename the blob if it is ADLS Gen2 and clone if not. That is explicitly in the code. It's unclear how disruptive removing the F2 shortcut for cloning will be to other users.

craxal commented 1 month ago

After some team discussion, we decided not to alter the existing shortcuts. The shortcuts have been in place for quite some time, and we don't want to disrupt other users' workflows.

Historically, clone started out as a client-side rename. But we had concerns about errors leading to data loss, and we adopted the policy of not implementing destructive operations unless the platform specifically had an API for doing that operation. So instead of renaming, we went to cloning for non-ADLS Gen2 blobs.