Skip to content
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

[FEATURE] Provide simple way to reset/wipe wadm store/s #1740

Open
2 tasks done
lachieh opened this issue Mar 22, 2024 · 6 comments
Open
2 tasks done

[FEATURE] Provide simple way to reset/wipe wadm store/s #1740

lachieh opened this issue Mar 22, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed rust Pull requests that update Rust code ux Issues related to User eXperience wash-cli Issues pertaining to the wash CLI

Comments

@lachieh
Copy link
Contributor

lachieh commented Mar 22, 2024

Affected project(s)

  • documentation
  • wasmCloud CLI (wash)

Is your feature request related to a problem? Please describe.

During a debugging session with a community member, I noticed that even after deleting everything in ~/.wash, the wadm store stayed in tact. This didn't turn out to be a problem, but I would have thought that the JetStream storage location would have been contained in the ~/.wash folder also.

Describe the solution you'd like

I'd love a way to be able to delete everything nats/wadm/wash related with a wash subcommand, or by deleting a single folder.

Proposed Action

After discussion (see thread), the proposed action to take is to:

  • Add a --purge option to wash down which will delete everything in the ~/.wash/ folder.
  • Move the JetStream storage location inside ~/.wash
@lachieh lachieh added the enhancement New feature or request label Mar 22, 2024
@thomastaylor312 thomastaylor312 added the good first issue Good for newcomers label Mar 25, 2024
@thomastaylor312
Copy link
Contributor

For anyone who'd like to implement this, you can find the default names of the streams to delete here and the name of the KV buckets to delete here and here. It might be worth making those publicly exported constants as part of the wadm crate to make it easier, but that is optional. A wash command could delete those streams and KV buckets to get a completely empty state.

I would also highly recommend asking for confirmation unless a --force flag is passed

@lachieh
Copy link
Contributor Author

lachieh commented Mar 25, 2024

@thomastaylor312 what would you suggest as a command? I was thinking either a subcommand on wash app like wash app reset, or a larger scoped command like wash wipe. Could also be a flag on wash down like --wipe which deletes everything wash related.

What do you think about setting the JS storage location to somewhere inside ~/.wash?

@thomastaylor312
Copy link
Contributor

We could definitely set the storage location inside of ~/.wash which would make it cleaner as well. As for where it goes, that is a good question. It doesn't feel like a top level command and it feels weird under wash app to me. Something on the wash down command feels like a good place to start.

Though this brings up the point I've been thinking on for the past few months: Is wash an administrative tool or a dev tool? I don't think it can continue being both in the long term without becoming super bloated, but it feels weird to split into two tools right now

@lachieh lachieh added rust Pull requests that update Rust code wash-cli Issues pertaining to the wash CLI ux Issues related to User eXperience labels Mar 26, 2024
@lachieh
Copy link
Contributor Author

lachieh commented Mar 26, 2024

Good with wash down --wipe or maybe --reset since feels a little less like a toilet instruction.

@thomastaylor312
Copy link
Contributor

--purge also works

@lachieh
Copy link
Contributor Author

lachieh commented Mar 28, 2024

Great, I've updated the description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed rust Pull requests that update Rust code ux Issues related to User eXperience wash-cli Issues pertaining to the wash CLI
Projects
None yet
Development

No branches or pull requests

2 participants