Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54998

Stash and archive should refuse symlinks

    XMLWordPrintable

Details

    Description

      Stash and archive should follow symlinks. Otherwise a symlink that the pipeline tries to archive is broken, a broken symlink is unstashed, unarchived or copied from another job, an error should be thrown.

      Attachments

        Issue Links

          Activity

            neothethird Jan Sprinz created issue -
            vivek Vivek Pandey made changes -
            Field Original Value New Value
            Labels archive pipeline stash archive pipeline pipeline-triaged stash
            abayer Andrew Bayer made changes -
            Link This issue duplicates JENKINS-52781 [ JENKINS-52781 ]
            abayer Andrew Bayer made changes -
            Resolution Duplicate [ 3 ]
            Status Open [ 1 ] Resolved [ 5 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-55560 [ JENKINS-55560 ]
            jglick Jesse Glick added a comment -

            Presence of symlinks or other special files in the input should just be treated as an error.

            jglick Jesse Glick added a comment - Presence of symlinks or other special files in the input should just be treated as an error.
            jglick Jesse Glick made changes -
            Resolution Duplicate [ 3 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Component/s core [ 15593 ]
            Component/s workflow-basic-steps-plugin [ 21712 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Summary Stash and archive should resolve symlinks Stash and archive should refuse symlinks
            oesolutions Chris Dore added a comment -

            jglick why should a symlink be an error?

            Since symlinks are not preserved, we abandoned using stash and instead we are now allocating a node for the entire pipeline, even when that node could be released back to the pool during certain stages. I would love to revisit our workaround and improve node utilization, having stash handle symlinks would make this very easy. Are there other alternative ideas to allow a pipeline to save state containing symlinks across stages on different nodes/workspaces?

            oesolutions Chris Dore added a comment - jglick why should a symlink be an error? Since symlinks are not preserved, we abandoned using stash and instead we are now allocating a node for the entire pipeline, even when that node could be released back to the pool during certain stages. I would love to revisit our workaround and improve node utilization, having stash handle symlinks would make this very easy. Are there other alternative ideas to allow a pipeline to save state containing symlinks across stages on different nodes/workspaces?
            jglick Jesse Glick added a comment -

            Use tar and decide in your script which options to pass to get the desired behavior: preserving symlinks, preserving other special files, preserving owner, preserving mode, etc.

            jglick Jesse Glick added a comment - Use tar and decide in your script which options to pass to get the desired behavior: preserving symlinks, preserving other special files, preserving owner, preserving mode, etc.
            jielpe_fr38 Jean-Luc Pé added a comment -

            I am facing the same issue I also consider as a bug.
            And I really do not understand why I should have to tar before stash and untar after unstash just because stash does not manage symlinks.
            For the best, an option "keep symlink target" should be available. If set, stash should save both the symlink and the target. And if the target is a directory, its content should also be saved. IMHO, the default value for this option should be true. Just because I do not see any good reason to save some sort of hollow shell.

            jielpe_fr38 Jean-Luc Pé added a comment - I am facing the same issue I also consider as a bug. And I really do not understand why I should have to tar before stash and untar after unstash just because stash does not manage symlinks. For the best, an option "keep symlink target" should be available. If set, stash should save both the symlink and the target. And if the target is a directory, its content should also be saved. IMHO, the default value for this option should be true. Just because I do not see any good reason to save some sort of hollow shell.

            People

              Unassigned Unassigned
              neothethird Jan Sprinz
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: