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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Component/s: clone-workspace-plugin
    • Labels:
      None
    • Environment:
      Linux

      Description

      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.

        Issue Links

          Activity

          Hide
          jrray 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/ -> .

          Show
          jrray 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/ -> .
          Hide
          owenmehegan owenmehegan added a comment -

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

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

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

          Show
          owenmehegan owenmehegan added a comment - Clone Workspace 0.4, using tar.gz instead of zip, still exhibits this problem
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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
          Hide
          nickolay_martinov Nickolay Martinov added a comment -

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

          Show
          nickolay_martinov Nickolay Martinov added a comment - This change seems to cause regression https://issues.jenkins-ci.org/browse/JENKINS-13614
          Hide
          erwan_q 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

          Show
          erwan_q 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
          Hide
          scm_issue_link 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.

          Show
          scm_issue_link 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.

            People

            • Assignee:
              abayer abayer
              Reporter:
              owenmehegan owenmehegan
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: