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

When workspace is cloned, symlinks are replaced with copies of the files they point to

      When a project uses the "clone workspace for SCM" feature to grab a workspace from another project, somewhere in that process all symlinks in the original workspace are replaced with COPIES of the files they are supposed to point to. These copies are then afflicted with JENKINS-8677, where their exec permissions are wiped out. I'm pretty sure this is related to the clone workspace plugin. When I look at the workspace the files are coming FROM, everything is fine. Then the workspace they end up in, in the job that clones them, shows this symlink issue.

          [JENKINS-9118] When workspace is cloned, symlinks are replaced with copies of the files they point to

          Robert Ray added a comment -

          This causes a lot of "too many levels of symbolic links" and long build times when the workspace includes circular symlinks, as in:

          foo/ -> .

          Robert Ray added a comment - This causes a lot of "too many levels of symbolic links" and long build times when the workspace includes circular symlinks, as in: foo/ -> .

          Owen Mehegan added a comment -

          The latest version of the Clone Workspace plugin still has this problem. Anyone know what the issue is?

          Owen Mehegan added a comment - The latest version of the Clone Workspace plugin still has this problem. Anyone know what the issue is?

          Owen Mehegan added a comment -

          Clone Workspace 0.4, using tar.gz instead of zip, still exhibits this problem

          Owen Mehegan added a comment - Clone Workspace 0.4, using tar.gz instead of zip, still exhibits this problem

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/FilePath.java
          core/src/main/java/hudson/Util.java
          core/src/main/java/hudson/util/DirScanner.java
          core/src/test/java/hudson/FilePathTest.java
          pom.xml
          http://jenkins-ci.org/commit/jenkins/d184d53b24a3a4f1b420ca6dbdb4438f72f1547b
          Log:
          JENKINS-9118

          Tar/untar now correctly supports symlinks.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/Util.java core/src/main/java/hudson/util/DirScanner.java core/src/test/java/hudson/FilePathTest.java pom.xml http://jenkins-ci.org/commit/jenkins/d184d53b24a3a4f1b420ca6dbdb4438f72f1547b Log: JENKINS-9118 Tar/untar now correctly supports symlinks.

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          changelog.html
          core/src/main/java/hudson/FilePath.java
          core/src/main/java/hudson/FileSystemProvisioner.java
          http://jenkins-ci.org/commit/jenkins/2dd70965a781f3f8477ce06d1ecf61f6c3017ace
          Log:
          [FIXED JENKINS-9118]

          WorkspaceSnapshot now uses the tar.gz format to handle symlinks
          correctly.

          Compare: https://github.com/jenkinsci/jenkins/compare/132f8b7...2dd7096

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/FilePath.java core/src/main/java/hudson/FileSystemProvisioner.java http://jenkins-ci.org/commit/jenkins/2dd70965a781f3f8477ce06d1ecf61f6c3017ace Log: [FIXED JENKINS-9118] WorkspaceSnapshot now uses the tar.gz format to handle symlinks correctly. Compare: https://github.com/jenkinsci/jenkins/compare/132f8b7...2dd7096

          dogfood added a comment -

          Integrated in jenkins_main_trunk #1580
          JENKINS-9118 (Revision d184d53b24a3a4f1b420ca6dbdb4438f72f1547b)
          [FIXED JENKINS-9118] (Revision 2dd70965a781f3f8477ce06d1ecf61f6c3017ace)

          Result = SUCCESS
          Kohsuke Kawaguchi : d184d53b24a3a4f1b420ca6dbdb4438f72f1547b
          Files :

          • core/src/test/java/hudson/FilePathTest.java
          • core/src/main/java/hudson/FilePath.java
          • pom.xml
          • changelog.html
          • core/src/main/java/hudson/util/DirScanner.java
          • core/src/main/java/hudson/Util.java

          Kohsuke Kawaguchi : 2dd70965a781f3f8477ce06d1ecf61f6c3017ace
          Files :

          • core/src/main/java/hudson/FileSystemProvisioner.java
          • changelog.html
          • core/src/main/java/hudson/FilePath.java

          dogfood added a comment - Integrated in jenkins_main_trunk #1580 JENKINS-9118 (Revision d184d53b24a3a4f1b420ca6dbdb4438f72f1547b) [FIXED JENKINS-9118] (Revision 2dd70965a781f3f8477ce06d1ecf61f6c3017ace) Result = SUCCESS Kohsuke Kawaguchi : d184d53b24a3a4f1b420ca6dbdb4438f72f1547b Files : core/src/test/java/hudson/FilePathTest.java core/src/main/java/hudson/FilePath.java pom.xml changelog.html core/src/main/java/hudson/util/DirScanner.java core/src/main/java/hudson/Util.java Kohsuke Kawaguchi : 2dd70965a781f3f8477ce06d1ecf61f6c3017ace Files : core/src/main/java/hudson/FileSystemProvisioner.java changelog.html core/src/main/java/hudson/FilePath.java

          This change seems to cause regression https://issues.jenkins-ci.org/browse/JENKINS-13614

          Nikolay Martynov added a comment - This change seems to cause regression https://issues.jenkins-ci.org/browse/JENKINS-13614

          erwan_q added a comment -

          Is it possible to revert this fix? This correction break archiving artifacts: https://issues.jenkins-ci.org/browse/JENKINS-13614

          erwan_q added a comment - Is it possible to revert this fix? This correction break archiving artifacts: https://issues.jenkins-ci.org/browse/JENKINS-13614

          Code changed in jenkins
          User: Jesse Glick
          Path:
          pom.xml
          src/test/java/hudson/tasks/AntTest.java
          http://jenkins-ci.org/commit/ant-plugin/567243149d9f39e87ab6264e0e227c2c1bbd5502
          Log:
          Building and thus testing against 1.456.
          Former testParameterExpansion failed against 1.456+ at least because the fix of JENKINS-9118
          upgraded Ant and thus caused <echoproperties> to properly escape output.
          Also it seems the project name was added to $BUILD_TAG in some undetermined version.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/test/java/hudson/tasks/AntTest.java http://jenkins-ci.org/commit/ant-plugin/567243149d9f39e87ab6264e0e227c2c1bbd5502 Log: Building and thus testing against 1.456. Former testParameterExpansion failed against 1.456+ at least because the fix of JENKINS-9118 upgraded Ant and thus caused <echoproperties> to properly escape output. Also it seems the project name was added to $BUILD_TAG in some undetermined version.

            abayer Andrew Bayer
            owenmehegan Owen Mehegan
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: