Bug #18834
closed[Workbench2] uploading a file into a subdirectory of a collection does not work, file always goes into the root of the collection
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-03-30 Sprint to 2022-03-16 sprint
- Assigned To set to Daniel Kutyła
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-03-16 sprint to 2022-03-30 Sprint
Updated by Daniel Kutyła almost 3 years ago
- Status changed from New to In Progress
Updated by Daniel Kutyła almost 3 years ago
New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/992852b9506bd3092bd052c681afca966478f88b
Test run: developer-tests-workbench2: #624
Branch: 18834-uploading-a-file-into-a-subdirectory-of-a-collection-does-not-work
Fixed upload to a subdirectory
Updated by Daniel Kutyła almost 3 years ago
New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/44d370d6e0e9e91dbc579e7d990667d52ad67b17
Test run: developer-tests-workbench2: developer-tests-workbench2: #626
Branch: 18834-uploading-a-file-into-a-subdirectory-of-a-collection-does-not-work
Fixed failing unit tests
Updated by Peter Amstutz almost 3 years ago
- Target version changed from 2022-03-30 Sprint to 2022-04-13 Sprint
Updated by Lucas Di Pentima almost 3 years ago
Reviewing arvados-workbench2|c8a07de - developer-tests-workbench2: #631
- At file
collection-service.ts
:- Methods
uploadFiles()/uploadFile()
: Instead of having atargetLocation
param that completely overrides bothcollectionUuid
andfile.name
for the finalfileURL
construction, I think it would be more dev-friendly to add a param called something likedestPath
with'/'
as a default value, so that it's used as another component of the fileURL building code. What do you think? Callers that don't specify it will get their uploads to go to the collection's root dir, and others will be able to specify where exactly files should be uploaded, making the code more readable.
- Methods
- Could you add some unit testing on
uploadFiles()/uploadFile()
? We should be trying to improve the testing coverage whenever we can. - What's the fix at arvados-workbench2|44d370d about? Seems unrelated to this branch.
- The new cypress test code doesn't seem to confirm that the file was really uploaded to the correct "
subdir/
", it just confirms that it was uploaded. Could you add an assertion on that too? One easy way to do it is to re-request the collection's record and check its manifest data.
Updated by Daniel Kutyła almost 3 years ago
New version: https://dev.arvados.org/projects/arvados/repository/arvados-workbench2/revisions/14b107de3fe4c29f4a37f1958bad99e2b82d2b24
Test run: developer-tests-workbench2: developer-tests-workbench2: #644
Branch: 18834-uploading-a-file-into-a-subdirectory-of-a-collection-does-not-work
Added unit tests, made cypress test more strict
Updated by Lucas Di Pentima almost 3 years ago
Just one observation:
- One of the new unit tests reveals that the code is issuing an upload request with double-slashes (file
src/services/collection-service/collection-service.test.ts:L125
). Could you fix the code (and update the test assertion) so that it doesn't do that?
Other than that, LGTM.
Updated by Daniel Kutyła almost 3 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Resolved
Applied in changeset arvados-workbench2|8d374520f28b507e8934d57be46374044fb93e2f.