Azure / Azurite

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

No way to create new default configuration for Azurite #1689

Open barrymculhane opened 2 years ago

barrymculhane commented 2 years ago

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

All services

Which version of the Azurite was used?

3.18.0

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

Visual Studio 2022

What's the Node.js version?

N/A

What problem was encountered?

There doesn't appear to be a way to configure Azurite from within VS2022, or to persist changes to Azurite behavior to a default configuration. When using VS2022 to develop/debug Azure functions, VS2022 automatically starts Azurite with the default configuration running on ports 10000/10001/10002. If your system already uses any of those ports, Azurite won't work. You have to launch Azurite externally with the port overrides, before debugging the Azure function. It would be nice if you could persist any configuration overrides to a configuration file that would be automatically invoked at the next launch, ideally picked up when VS2022 automatically starts Azurite.

Steps to reproduce the issue?

N/A

Have you found a mitigation/solution?

Yes, launch Azurite from a Command Windows with specific arguments (prior to debugging), and customize the app connection string to reference those custom settings

blueww commented 1 year ago

@barrymculhane

Azurite do support to configure customized B/T/Q port, but the setting is not opened in Visual studio. This is an issue for Visual Studio. (We can't fix it by Azurite code)

Would you like to contact VS team for this issue? This doc has the details on how to report a VS feedback issue : https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022

bdcoder2 commented 1 year ago

I have reported the issue to the VS development team as well, see:

https://developercommunity.visualstudio.com/t/No-way-to-create-new-default-configurati/10162406,

as this is driving me a bit crazy as well.

BilThomas commented 1 year ago

Would it be possible to have Azurite optionally pull some command line options from either environmental variables or a config file instead of only from command line?

This would allow override to configure for specific environments for all projects. (Some of the default ports are already in use by enterprise software that can not be moved. Not having a file or variable override requires additional step of manually launching azurite for each development session for each developer, which is confusing for developers that don't use it frequently.)

blueww commented 1 year ago

@BilThomas

Currently Azurite open different config in different way, like port is open in command line parameters. This is based on some consideration, like the port to start Azurite might change in different Azurite instance on same machine (to avoid port conflict with current occupied port on the machine). If you would like VS to open the configuration in the VS started Azurite, please contact VS team. This doc has the details on how to report a VS feedback issue : https://docs.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022

Besides that, you can also install/start Azurite with several different ways, like npm/VS code extension/ docker...