Allow deleting corrupt or incomplete datasets - #1830
Open
mattdawkins wants to merge 1 commit into
Open
Conversation
deleteDataset() validated the project first, so a dataset whose import died before dataset.json was written could never be removed from the UI. getValidatedProjectDir() also created aux/ before checking the base path existed, resurrecting stub directories on every failed lookup.
Collaborator
|
I think I just just autosync on launch ofthe electorn version, this would make sure that broken things are removed and it just suggest to run autosync if you try to open/delete a non-existing item |
Member
Author
|
I'm not sure 'sync to delete' is readily known to users (or me) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A dataset whose import died before
dataset.jsonwas written can never be deleted from the Recents list —delete-datasetfails withmissing metadata json file <path>.deleteDataset()no longer runsgetValidatedProjectDir(); it removes the project directory whatever state it's in, loads the dataset json only opportunistically for the DIVE_Jobs_Output cleanup, returns true when the directory is already gone, and rejects ids resolving outside DIVE_Projects.getValidatedProjectDir()checks the base path beforeensureDirSync(aux), so failed lookups stop creating stub<id>/auxiliary/dirs — which is what made the ghost entries reappear after manual cleanup.Tests updated for the new behavior, 3 added.