seek4science / seek

For finding, sharing and exchanging Data, Models, Simulations and Processes in Science.
http://www.seek4science.org
BSD 3-Clause "New" or "Revised" License
76 stars 52 forks source link

RO-Crate generation fails with symlink in repo #1221

Closed fbacall closed 2 years ago

fbacall commented 2 years ago

error is:

       8: from app/models/concerns/workflow_extraction.rb:214:in `ro_crate_zip'
        7: from app/models/concerns/workflow_extraction.rb:209:in `ro_crate'
        6: from app/models/concerns/workflow_extraction.rb:209:in `tap'
        5: from app/models/concerns/workflow_extraction.rb:194:in `block in ro_crate'
        4: from lib/git/operations.rb:86:in `in_temp_dir'
        3: from lib/git/operations.rb:88:in `block in in_temp_dir'
        2: from app/models/concerns/workflow_extraction.rb:196:in `block (2 levels) in ro_crate'
        1: from app/models/concerns/workflow_extraction.rb:215:in `block in ro_crate_zip'
Zip::EntryExistsError (add failed. Entry utils/make_csv/make_csv.py already exists)

repo/symlink: https://github.com/emo-bon/pipeline-v5/tree/eosc-life-gos/utils/make_csv

In theory it should handle symlinks since: https://github.com/ResearchObject/ro-crate-ruby/commit/545f3f098d0636d9aaa78965778ecb330cdbc66a https://github.com/rubyzip/rubyzip/pull/531

fbacall commented 2 years ago

It seemed to happen because there was already a zip file in filestore/converted_assets. When that file was removed the error resolved.

Need to look into why it does not either: reuse the file, or overwrite it completely.