Azure / Azurite

A lightweight server clone of Azure Storage that simulates most of the commands supported by it with minimal dependencies
MIT License
1.83k stars 325 forks source link

404 creating zero byte files #301

Open fbonds opened 4 years ago

fbonds commented 4 years ago

blob storage issue Azurite 3.3.0-preview (cloned from here github) Node.js v10.15.3

We're using the javascript storage sdk to extract gzipped tarballs into blob storage. This works like a champ until one of the files in the tarball is a zero byte file. What that happens, azurite 404s on the PUT request.

127.0.0.1 - - [13/Dec/2019:19:05:03 +0000] "PUT /devstoreaccount1/extracted/NONzerobyte.log?sv=2019-02-02&st=2019-12-13T19%3A00%3A03Z&se=2019-12-13T19%3A30%3A03Z&sr=b&sp=wd&sig=xxxxx&comp=blocklist HTTP/1.1" 201 -

127.0.0.1 - - [13/Dec/2019:19:05:03 +0000] "PUT /devstoreaccount1/extracted/NONzerobyte2.log?sv=2019-02-02&st=2019-12-13T19%3A00%3A03Z&se=2019-12-13T19%3A30%3A03Z&sr=b&sp=wd&sig=xxxxx&comp=blocklist HTTP/1.1" 201 -

127.0.0.1 - - [13/Dec/2019:19:05:03 +0000] "PUT /devstoreaccount1/extracted/ZERObyte.log?sv=2019-02-02&st=2019-12-13T19%3A00%3A03Z&se=2019-12-13T19%3A30%3A03Z&sr=b&sp=wd&sig=xxxxx&comp=blocklist HTTP/1.1" 404 -

If i remove all the zero byte files from my tarball, this doesn't happen. As a workaround for what I'm doing that doesn't work though as I need an accurate directory contents in my result. This only occurs with the emulator. The same code pointed at Azure doesn't have this issue (but we'd rather not pay the storage fees while testing).

XiaoningLiu commented 4 years ago

Thanks! Will investigate and fix if this confirmed as a bug.

fbonds commented 4 years ago

Thank you. We look forward to the fix. We'd really like to use this going forward, but are blocked by this issue in doing so.

XiaoningLiu commented 4 years ago

@fbonds Believe this is same with https://github.com/Azure/Azurite/issues/304 and get fix checked into dev branch. Please confirm if dev branch works for you.

fbonds commented 4 years ago

I don't see the change.

$ git fetch $ git checkout --track origin/dev Branch 'dev' set up to track remote branch 'dev' from 'origin'. Switched to a new branch 'dev' $ git pull Already up to date.

XiaoningLiu commented 4 years ago

@fbonds Please check if this https://github.com/Azure/Azurite/commit/6af3cc17dc194d3dc39147f73f1fc52f635ec782 commit is in your local dev branch

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.