-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need ability to clear all storage #588
Comments
Normally, You can just clear the files listed here , in the workspace . If you use SQL to save metadata, you can just delete the related DB. |
Of course; but that only works as long as y'all never change how you're storing stuff on the backend and/or always keep the docs in sync when you do. Since this is a replacement for the old emulator, I think it should at least have parity with it. I want to focus on the task at hand, and having to context switch to poke around filesystems or databases isn't conducive to that. |
Thanks for the reply! Open source contributions are very welcome. If you have a better solution for that, and would like to contribute to it, feel free to send PR. |
Anything that I could do w/ the old Azure Storage Emulator I should be able to do in Azurite. |
Thanks for the reply! Would you please share what's your preferred way for Azurite to clean all data? For this request, we will evaluate per the customer vote. If there are many customer need it, we will high priority it. |
yes |
Will follow up that with @brandonh-msft in mail. |
It is correct that the ability to clear or clean the storage while developing durable functions is really necessary. I have also tried using the VSCode durable function plugin to delete the hub (nothing else seemed to work) but it is somewhat slow compared to previous CLI command for the old storage emulator. I appreciate this is an open source project and if I find time I will do something about it. For now I just want to draw attention to this area, that for developers working a lot on durable functions Azurite breaks our development workflow in comparison with the old storage emulator. |
After a new laptop with only VS2022, my workflow is hampered by the absence of a method equivalent to "AzureStorageEmulator.exe clear all". As more people migrate to VS2022, this will only become more urgent. |
@jacobherrera |
We have discussed with VS team in mail, and generally agree will have a fix for it in VS. |
I want to point out that what's been asked & advocated for isn't yet another UI solution, it's a command-line driven one that affords scriptability and no dependence on external/consuming product teams for implementation/support; parity with Azure Storage Emulator. If this is to be implemented in each consumer of Azurite in whatever way the consumer so chooses, Azurite is forever beholden to those consumers to never break/change the way it stores things lest the consumer's functionality stop working. Or, at best, Azurite has now tied itself to the release cadence of whichever external consumers it deems "unbreakable" which, IMO, is against the very spirit of Azurite. |
@brandonh-msft
|
@brandonh-msft Please note:
|
Seems like that solves for |
@brandonh-msft
|
I'm fine if you want to propose that as a temporary workaround but not the permanent solution.
So what I'm saying is thanks, and I'll use that if/when I get back to having Azurite as part of my daily dev workflow (I've moved on from Functions/DF work) but would much rather see something I can discover & interpret from |
@brandonh-msft |
+1 for this request. Something like "factory-reset" would be nice that resolves all the errors and clears data. |
I'm sorry to ask such an ignorant question, but can anyone point me to the default Azurite location for VS 2022 on Win 11? I desperately need this functionality, but can't seem to find it. |
When you fire up VS and target a Fxn app as your startup project, you'll get this kind of output in the 'Service Dependencies' area of the Output pane:
That'll tell you where it is. It's likely going to be something like |
@brandonh-msft Thank you!! |
Another +1 for this request. We are using the old Azure Storage Emulator for some of our automated end-to-end tests. Those tests run the "clear all" command at startup to ensure a consistent environment between test runs. The lack of similar functionality has so far prevented us from migrating those tests to use Azurite. |
@blueww When I previously tried to delete all files the problem I had, at least when running with Visual Studio, the files were locked and I had to close VS in order to delete the files. This is very disruptive to a development workflow. |
The file is locked should because the Azurite instance started by VS is still running, so the file is locked by the running Azurite instance. Currently to clean up Azurite data, there must be no Azurite instance is running with the specific workspace (or the data might not be aligned and take issues) We still don't find a good way to cleanup Azurite data when the Azurite instance is running, there might need big framework change to get this. As you said "Those tests run the "clear all" command at startup", so could you cleanup the workspace folder before start running Azurite in the test? |
Actually for durable function development all I really need to do is clean all the data within the task hub that the durable function uses. If I can clear all task hub data easily that is probably good enough most of the time. Currently I use the VSCode Durable Function extension to achieve this, and it works well as workaround. |
Thanks @codermrrob for the update! |
Just chiming in to make sure we're not saying that every user who has need to "clear all" for azurite should "just" install VS Code + DF Extension in order to do it. |
The above .bat deleted the Azurite.exe too. Serves me right for not taking a better look before running it |
Do you put the Azurite.exe in same folder as the WorkspaceFolder? (this command will remove all files under workspacefolder)
|
Hi there! I'm a bit uncomfortable with the above proposed solutions. I feel like I'm begging to leave my compy in a sad state. Is it simpler to uninstall Azurite and reinstall? |
@rruenroeng |
This feature would make a lot of sense with the recently introduced |
Sorry for responding a lifetime later @blueww , |
@rruenroeng |
This is good but still not what's needed. I do want persistence between runs of Azurite (e.g. a reboot of my system, etc.) while I'm developing, but need the ability to clear this on demand when necessary. And to be super-candid, the fact we're adding features like in-memory persistence (not sure how much of an ask this was from users) instead of something that's been requested for over 3 years now is a bit frustrating. |
Sounds good - however where can this parameter be set in Visual Studio? |
Would you like to contact VS team to ask them to open this configuration in the VS started Azurite. |
Workspace is located here: C:\Users\USERNAME\AppData\Local.vstools\azurite |
Any update on this? |
We are working on some other higher priority features. So I am afraid this won't be in our recent priority list. |
Which service(blob, file, queue, table) does this issue concern?
All
Which version of the Azurite was used?
3.8.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What's the Node.js version?
12.18.4
What problem was encountered?
I need to be able to clear storage like I could with Azure Storage Emulator using
clear all
,clear blob
, etc.Steps to reproduce the issue?
I'm working off the output from
-h
- it says nothing about the ability to do this.Have you found a mitigation/solution?
No, I am new to Azurite so I'm unsure if there's some "hack" you can do to effectively do this.
Use case:
When developing with a technology like Durable Functions, which heavily utilizes queues, tables, and blob to maintain state of orchestrations it's incredibly useful to be able to clear backend storage contents as a way to "restart" an orchestration debugging session.
The text was updated successfully, but these errors were encountered: