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

VSCode extension should create and use .azurite folder in current working directory when no location is specified #391

Open hannesne opened 4 years ago

hannesne commented 4 years ago

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

NA

Which version of the Azurite was used?

v3

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

NA

What's the Node.js version?

NA

What problem was encountered?

The default lcoaiton for azurite to create it's files is the current working directory when invoked from the vscode extension. This creates a bunch of files and folders, excessively polluting the workspace. It would be better to create a .azurite directory in the current directory and put all the required files in there. This folder can then be added to .gitignore and other ignore files. It is not convenient to have to set the location to a fixed directory to reference a subfolder in the current working directory.

Steps to reproduce the issue?

NA

Have you found a mitigation/solution?

NA

XiaoningLiu commented 4 years ago

Hi @hannesne That's a great feedback! We will consider this in next major release as a breaking change. Before that, please define Azurite location in Visual Studio settings.

image

JustinGrote commented 4 years ago

@XiaoningLiu can you enable the use of variables such as ${workspaceFolder} for the Azure: Location setting? Currently I have to hard code it absolutely for each workspace.

empz commented 3 years ago

It's actually really weird that the default behaviour is to output in the current working directory, but then there's no easy way to append a path to it without hardcoding the full directory path.

My suggestion is to make it accept both absolute and relative paths. And yes, make the default to be .azurite making the extension to put all files inside the current working directory / .azurite folder as suggested by the issue opener.

XiaoningLiu commented 3 years ago

That's a valid ask and tracked on our radar. In the same time, feel free to send out PR which will speed up.

DaRosenberg commented 3 years ago

Two more things that should perhaps be addressed as part of this:

blueww commented 3 years ago

The feature request is also mentioned in https://github.com/Azure/Azurite/issues/962

dpolivy commented 3 years ago

I took a stab at pulling together a PR to address this, as it was bugging me to pollute my git working directory with so many files. Hopefully this is acceptable and can be merged soon, but certainly open to feedback.

TroyWitthoeft commented 2 years ago

Just chiming in. Love Azurite, but it's not pleasant how it pollutes the working directory. Would love it to align more closely with VS Code and drop it's files into a ./azurite subfolder. Any movement on PR #1061 please?

DaRosenberg commented 2 years ago

That's a valid ask and tracked on our radar. In the same time, feel free to send out PR which will speed up.

@XiaoningLiu how do you mean a PR will speed it up if you just ignore it for 10 months? You asked for a PR, so how about you either accept it, or tell the author what needs to be changed?

XiaoningLiu commented 2 years ago

Thanks for ping. Please refer to https://github.com/Azure/Azurite/pull/1061#issuecomment-1188852899