From bb129e9c88b306692f5046edf6ce6219f0de61b3 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Wed, 22 Jan 2020 16:27:06 -0800 Subject: [PATCH] code review comments --- pkg/snapshot/snapshot.go | 4 ++-- pkg/util/fs_util.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/snapshot/snapshot.go b/pkg/snapshot/snapshot.go index e26413cc4..2a24aa1fb 100644 --- a/pkg/snapshot/snapshot.go +++ b/pkg/snapshot/snapshot.go @@ -170,7 +170,7 @@ func (s *Snapshotter) scanFullFilesystem() ([]string, []string, error) { filesToAdd := []string{} for path := range memFs { if util.CheckWhitelist(path) { - logrus.Infof("Not adding %s to layer, as it's whitelisted", path) + logrus.Tracef("Not adding %s to layer, as it's whitelisted", path) continue } // Only add changed files. @@ -183,7 +183,7 @@ func (s *Snapshotter) scanFullFilesystem() ([]string, []string, error) { if err != nil { return nil, nil, err } - logrus.Debugf("Adding files %s to layer, because it was changed.", files) + logrus.Tracef("Adding files %s to layer, because it was changed.", files) filesToAdd = append(filesToAdd, files...) } } diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index 0a75b08d2..0a0a4aebe 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -719,8 +719,9 @@ func getSymlink(path string) error { return nil } -// otiai10Cpy.Copy in case the src file is a symlink, will copy the target -// file at destination instead of creating a symlink. See #915 for more details. +// For cross stage dependencies kaniko must persist the referenced path so that it can be used in +// the dependent stage. For symlinks we copy the target path because copying the symlink would +// result in a dead link func CopyFileOrSymlink(src string, destDir string) error { destFile := filepath.Join(destDir, src) if fi, _ := os.Lstat(src); IsSymlink(fi) {