"Remove file" deletes whole collection?
- Create a collection with arv-put. It consists of two files in a subdirectory.
- Go to workbench2
- Select the first file
- Click on the ... menu on the right
- Choose "Remove"
- Hit ok
- Instead of just one file, all the files are gone.
This behaves inconsistently. I've also tried to delete a single item in a folder and it deleted the whole folder (but not the whole collection).
#8 Updated by Daniel Kutyła 11 months ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/36d0bf2c656c5ff79c94216a8bfbed015bc84f7e
Test run: https://ci.arvados.org/job/developer-tests-workbench2/203/
Fixed duplicated file names, added sorting in order to avoid of folder being removed before the files within them
#12 Updated by Lucas Di Pentima 11 months ago
Reviewing arvados-workbench2|36d0bf2 - branch
- The remove feature seems to work correctly now, thanks! Would you add an integration test with a case similar to what this ticket describes? (remove file in subdir) You could make one of those by creating a collection with a synthetic
manifest_textlike other cypress test already do, so that you don't need to upload real files.
- From reading the code and doing some testing on my own, the received paths are sorted by length descending, I suppose this is to avoid getting errors when trying to remove files that were inside subdirectories already removed. This looks ok at first but when selecting several parts of a very deep and/or populated file tree, this would make the wb2 issue too many webdav requests by individually removing many files that could be just removed in one sweep because the parent directory is already scheduled for removal. Could we make the opposite? Like, starting removing the shorter paths and once they’re gone, avoid sending delete requests to dirs/files inside the already removed ones?
#14 Updated by Daniel Kutyła 9 months ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/a293a23fa93855c9c6e180bfd77880b794c24673
Test run: https://ci.arvados.org/job/developer-tests-workbench2/222/
Added browser tests
#16 Updated by Lucas Di Pentima 9 months ago
Danny: Not sure if this is ready for review, but I took a look at it anyways.
- The integration tests look good. One suggestion, though: You can modify the
manifest_texton the second test to directly create a collection with files inside a subdirectory by replacing
./subdiron the file entries, that way you could simplify a lot the test because you won't have to make it move the file. You can read more about the manifest text format here: https://doc.arvados.org/v2.1/architecture/manifest-format.html
- My second bulletpoint at note-12 is still pending to be addressed.
#17 Updated by Daniel Kutyła 9 months ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/d5db24f8cfa26d546596b99e644e37c72b6b1fae
Test run: https://ci.arvados.org/job/developer-tests-workbench2/226/
#19 Updated by Daniel Kutyła 9 months ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/d50bc0acaab286ec7c639c2bb52280a2e3099a67
Test run: https://ci.arvados.org/job/developer-tests-workbench2/227/
More unit tests
#21 Updated by Daniel Kutyła 9 months ago
- Status changed from In Progress to Resolved
Applied in changeset arvados-workbench2|7437e0b4a85480fc6ca977488a5bb501e7fa1e3e.