Azure / azure-storage-net

Microsoft Azure Storage Libraries for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues with Filesystem (aka Blob Container) and Paths (aka Folders)

NorthHighlandNicole opened this issue · comments

TLDR: Can't seem to create blob containers or folders when using Azure Storage Emulator.

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

Windows Azure Storage Emulator 5.10.0.0

Which platform are you using? (ex: .NET Core 2.1)

.Net Core 3.1

What problem was encountered?

  1. Cannot create a filesystem in Azure Storage Emulator calling API
    https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/filesystem/create

  2. Cannot create a path in Azure Storage Emulator calling API
    https://docs.microsoft.com/en-us/rest/api/storageservices/datalakestoragegen2/path/create

How can we reproduce the problem in the simplest way?

Problem Creating FileSystem

  1. Run Azure Storage Explorer
  2. Run Azure Storage Emulator
  3. Make a call to API's listed above
    You will receive a 400 error reading "an http header that's mandatory for this request isn't specified"
    It appears in this case it thinks it's trying to save something to the blob instead of create the filesystem

Problem Creating Path

  1. Run Azure Storage Explorer
  2. Run Azure Storage Emulator
  3. In Azure Storage Explorer
  4. Add a new blob container under the emulator
  5. Set public access for container to "public read access for container and blob"
  6. "manage access polices" for container and check all boxes (Read, Add, Create, Write, Delete, List"\
  7. "Get Shared Access Signature" for container & click create
  8. use provided URI to make API call

You will receive a 404 error indicating that resource does not exist.

Have you found a mitigation/solution?

No, but to make it all the more strange, if you upload a file to the container in the 2nd issue, and you call the API to grab that file, it works just fine. You DON'T get a 404 like I would've thought.

Context

I would really appreciate your help. We have code to create paths and upload items into Azure Data Lake Storage. I'm trying to help my team understand the important of testing and implementing integration tests for this work. Obviously in our pipeline we can run this against our testing environment storage with no problems since we can save keys in our Key Vault. But when the developers are working locally it would be best if they can work against the storage emulator. Is it not an option to work with "filesystems" and "paths" using the API & storage emulator? Or am I doing something wrong here? Would appreciate any and all guidance.