application-research / estuary-www

https://estuary.tech
https://estuary.tech
Other
35 stars 31 forks source link

Added Delete Functionality #126

Closed OlypsisAli closed 1 year ago

OlypsisAli commented 1 year ago

Previously, users were unable to delete files via the estuary dashboard. They now have that ability.

OlypsisAli commented 1 year ago

@jimmylee Note that I decided to repull the latest code and reimplement my previous PR. Let me know if you have any feedback.

neelvirdy commented 1 year ago

Thanks for opening a PR @OlypsisAli. The complexity here is that many files are no longer safely deletable. If they have entered the dealmaking stage, we can't allow a delete because it would break dealmaking for that file and all other files aggregated with it.

The only case you can safely delete in is when the file is still in a staging bucket that has not been aggregated. Instead of putting the delete button here and returning errors in all other cases, can you move the delete button into the StagingTable?

gmelodie commented 1 year ago

@neelvirdy this seems like an estuary problem, not a frontend one. I mean, nothing stops me from deleting a file while deal making is in process if I just call the API. I think just unpinning the CIDs is good enough in terms of deletion.

neelvirdy commented 1 year ago

@neelvirdy this seems like an estuary problem, not a frontend one. I mean, nothing stops me from deleting a file while deal making is in process if I just call the API. I think just unpinning the CIDs is good enough in terms of deletion.

in dealmaking and reconciliation, we dont handle the cases where data has been deleted yet - so we just prevent it if we've entered those stages

so you can call the API but it will throw an error if it's a content that's been aggregated in a zone and that zone has started dealmaking. instead of setting up the user to hit the error pretty often in the frontend, i'd rather put it in a page (Staging) where all of the files are in a state that will not lead to an API error

jimmylee commented 1 year ago

Going to close this since its lingered for a while, feel free to re-open when you've had a chance to work through our comments.