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

Fully delete / wipe remote DWN #805

Open
bnonni opened this issue Sep 20, 2024 · 3 comments
Open

Fully delete / wipe remote DWN #805

bnonni opened this issue Sep 20, 2024 · 3 comments

Comments

@bnonni
Copy link

bnonni commented Sep 20, 2024

It would be nice, especially for development puposes, to have an easy way to wipe the data store of a remote dwn. @csuwildcat said "We need a command like that, but don't have it." Consider this issue as the starting point for discussion on how to achieve this behavior. My initial idea is something simple: Create a function that proxies the functionality of web5.dwn.records.query and runs record.delete on each returned record. Same goes for web5.dwn.protocols.query but instead of .delete do a web5.dwn.protocols.configure({}); this could be exposed in @web5/api as web5.dwn.wipe. Open to other ideas.

@andorsk
Copy link
Contributor

andorsk commented Sep 21, 2024

should you be able to partial wipe based on a subset of permissions or should wiping be bound only to tenant based activities?

i.e I Alice authored 1000 messages to Bob's remote node and has write permission. Can Alice purge records from Bob via wipe or is wipe bound to only tenant?

also, a thought to call it purge or prune. Not wipe.

@csuwildcat
Copy link
Contributor

@andorsk we are using the word 'prune' already for deep deletes

Copy link

Fully deleting and wiping a remote data store are not necessarily the same thing. Wiping removes all content but may leave other metadata, such as the data store identity. That can be a problem when a test shouldn't know a new data store's identity. Fully deleting and starting a new data store avoids this hazard. (I'm particularly sensitive to this effect because it caused me a lot of pain debugging some tests.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants