Bug #17016
closed"Remove file" deletes whole collection?
Description
- 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).
Updated by Peter Amstutz over 4 years ago
- Subject changed from Remove file deletes whole project? to "Remove file" deletes whole collection?
Updated by Peter Amstutz over 4 years ago
- Related to Bug #15771: Deleting a selection of files fails added
Updated by Peter Amstutz over 4 years ago
- Target version changed from 2020-11-04 Sprint to 2020-11-18
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-11-18 to 2020-12-02 Sprint
Updated by Daniel Kutyła about 4 years ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/36d0bf2c656c5ff79c94216a8bfbed015bc84f7e
Test run: developer-tests-workbench2: #203
Fixed duplicated file names, added sorting in order to avoid of folder being removed before the files within them
Updated by Daniel Kutyła about 4 years ago
- Status changed from New to In Progress
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-12-02 Sprint to 2020-12-16 Sprint
Updated by Daniel Kutyła about 4 years ago
Code mentioned above should also fix #15771 as this bug is closely related
Updated by Lucas Di Pentima about 4 years ago
Reviewing arvados-workbench2|36d0bf2 - branch 17016-delete-single-file-deletes-whole-collection
- 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_text
like 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?
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2020-12-16 Sprint to 2021-01-06 Sprint
Updated by Daniel Kutyła about 4 years ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/a293a23fa93855c9c6e180bfd77880b794c24673
Test run: developer-tests-workbench2: #222
Added browser tests
Updated by Peter Amstutz about 4 years ago
- Target version changed from 2021-01-06 Sprint to 2021-01-20 Sprint
Updated by Lucas Di Pentima about 4 years 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_text
on the second test to directly create a collection with files inside a subdirectory by replacing.
with./subdir
on 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.
Updated by Daniel Kutyła about 4 years ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/d5db24f8cfa26d546596b99e644e37c72b6b1fae
Test run: developer-tests-workbench2: #226
Code optimisation
Updated by Lucas Di Pentima about 4 years ago
This works great, thanks!
As one last request: Could you write a unit test that test this last optimization? I think it would be really useful to have automated warranties that this keeps working as expected in the future.
Updated by Daniel Kutyła about 4 years ago
New version first commit: https://dev.arvados.org/projects/arvados-workbench-2/repository/revisions/d50bc0acaab286ec7c639c2bb52280a2e3099a67
Test run: developer-tests-workbench2: #227
More unit tests
Updated by Daniel Kutyła about 4 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados-workbench2|7437e0b4a85480fc6ca977488a5bb501e7fa1e3e.