Bug #5179
closed[Workbench] [SDKs] Incorrect collection display when stream has entries with subdirectories
Description
Here, temp_admix_files-PATHOMAP_P00553_1k should be a directory with those files tempAut.bed (etc) in it. this is collection: qr1hi-4zz18-4ea12pbiq1zaf08. This can be reproduced locally and should be a directory.
Files
Updated by Brett Smith almost 10 years ago
- Subject changed from Creating a directory in the output directory and merging to a collection does not hold the directory structure to [Workbench] Incorrect collection display when stream has entries with subdirectories
- Category set to Workbench
- Target version set to Bug Triage
Updated by Tom Clegg almost 10 years ago
- Target version changed from Bug Triage to 2015-04-01 sprint
Updated by Tom Clegg almost 10 years ago
Best fix for this is probably to use the new SDK from #5104.
Updated by Brett Smith almost 10 years ago
- Assigned To deleted (
Brett Smith) - Target version changed from 2015-04-01 sprint to Arvados Future Sprints
Updated by Tom Clegg almost 10 years ago
Looks like this is a bug in Keep#files in source:sdk/ruby/lib/arvados/keep.rb#L164 -- each_file_spec provides [stream_name, pos, size, filename] and #files needs to split filename by '/' and move the dir parts onto streamname in order to consistently return [dirname, basename, size] regardless of whether streams===dirs.
(Obviously need a test case for this too!)
Updated by Radhika Chippada almost 10 years ago
- Subject changed from [Workbench] Incorrect collection display when stream has entries with subdirectories to [Workbench] [SDKs] Incorrect collection display when stream has entries with subdirectories
- Status changed from New to In Progress
- Assigned To set to Radhika Chippada
- Target version changed from Arvados Future Sprints to 2015-04-29 sprint
Updated by Radhika Chippada almost 10 years ago
Implementation notes:
- Updated Keep#files method as per Tom's note. Added test fixture and test.
- Updated workbench Gemfile* to use the newer gem version. (Note: Please let me know if I did not get this right. Thanks.)
- Manual test performed on the collection qr1hi-4zz18-4ea12pbiq1zaf08 and it now displays directory structure. And the files in directories are viewable and downloadable (#5682)
Updated by Tom Clegg almost 10 years ago
comments on 5179-dirs-in-filenames @ 17e59fe
Code looks good. (The "rpartition" threw me off for a bit by using the "/" from "dir1/file1" to build the "./dir1" string... but then I got it.)
I think it would be worthwhile to add a test case like this:
. #{random_block(10)} 0:3:file1 3:3:dir1/file1 6:4:dir1/dir2/file1 ./dir1 #{random_block(10)} 0:3:file1 3:7:dir2/file1
→ check that manifest.files contains ["./dir1", "file1", 6]
and ["./dir1/dir2", "file1", 11]
Unfortunately this will mean doing the Gemfile.lock thing over again. If that's too painful, and assuming the actual sdk code doesn't have to change to make that test pass (as I suspect) you could merge 17e59fe and then add this test in another commit after jenkins has had a chance to build/publish the 0.1.20150419022214 package.
Updated by Radhika Chippada almost 10 years ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|commit:da705110826943b04151f959e059b5f4ffcc4c5e.