-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Centos 5.4
-
-
Jenkins 2.230
If the tree you are archiving contains an internal symlink, the target files will be archived twice. This can lead to a very large increase in the size of the archived data and consequently, the time it takes to archive it.
Example:
/archive-root
/big-directory
/symlink -> big-directory
Then every file in big directory will be archived twice.
A fix would be for Hudson to detect internal symlinks and copy them rather than dereference them.
- is duplicated by
-
JENKINS-5993 "Archive the artifacts" does not honor symbolic links
-
- Closed
-
[JENKINS-5597] symlinks in archive trees lead to double archiving
Assignee | New: Andrew Bayer [ abayer ] |
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
Link |
New:
This issue is duplicated by |
Component/s | New: core [ 15593 ] |
Workflow | Original: JNJira [ 135689 ] | New: JNJira + In-Review [ 174366 ] |
Changing this to an improvement request rather than a bug - we're using Ant's copy task, fileset and directory scanner for artifact archiving (and other recursive copying), so changing to recreate symlinks rather than dereferencing them (assuming, of course, that the underlying OS/filesystem can handle symlinks in the first place) would mean either writing our own equivalents to the Ant classes we're using or forking the existing Ant classes.
There are a couple alternatives that I can see - first, if you know what the problematic symlink's name is, you can exclude it from the artifact archiving, in the advanced config for the artifact archiver. Second, we could add an option to ignore symlinks - the Ant classes in question already have an option to not follow symlinks, so it'd be pretty trivial to add an advanced option to take advantage of that. Of course, neither of these alternatives are particularly elegant, but until I dive deep enough into the Ant code to decide whether forking is really viable, they're definitely options.