seqeralabs / wave-cli

Command line tool for Wave containers provisioning service
https://seqera.io/wave
Apache License 2.0
13 stars 3 forks source link

An exception is reported when a context file path is longer than 100 chars #26

Closed pditommaso closed 1 year ago

pditommaso commented 1 year ago

The following error is reported when the building context includes long file paths

java.lang.IllegalArgumentException: file name '.docusaurus/docusaurus-plugin-content-docs/default/category-docs-tutorialsidebar-category-tutorial-basics-918.json' is too long ( > 100 bytes)
        at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.handleLongName(TarArchiveOutputStream.java:702)
        at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.putArchiveEntry(TarArchiveOutputStream.java:366)
        at io.seqera.wave.util.Packer.makeTar(Packer.java:82)
        at io.seqera.wave.util.Packer.layer(Packer.java:136)
        at io.seqera.wave.util.Packer.layer(Packer.java:132)
        at io.seqera.wave.util.Packer.layer(Packer.java:120)
        at io.seqera.wave.cli.App.prepareContext(App.java:459)
        at io.seqera.wave.cli.App.run(App.java:398)
        at io.seqera.wave.cli.App.main(App.java:217)

A quick search shows that it should be enabled the support for long file names in the tar using the following:

TarArchiveOutputStream stream = new TarArchiveOutputStream(...)
stream.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX)

Read more here.

munishchouhan commented 1 year ago

@pditommaso fix has been made in libseqera https://github.com/seqeralabs/libseqera/pull/8 @jason-seqera Once this is merged and a new version of wave-util is available I will create PR here too