Skip to content

Commit 007f722

Browse files
committed
fix: log filepath.Walk errors during build size estimation
Add debug logging for errors encountered during directory walking in estimateBuildSize, so that inaccessible paths are visible instead of being silently ignored. Signed-off-by: Zhao Chen <winters.zc@antgroup.com>
1 parent ead5d37 commit 007f722

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/backend/build.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,9 @@ func estimateBuildSize(workDir string, mf modelfile.Modelfile) int64 {
292292
continue
293293
}
294294
if info.IsDir() {
295-
_ = filepath.Walk(path, func(_ string, fi os.FileInfo, err error) error {
295+
_ = filepath.Walk(path, func(walkPath string, fi os.FileInfo, err error) error {
296296
if err != nil {
297+
logrus.Debugf("build: failed to access path %s for size estimation: %v", walkPath, err)
297298
return nil
298299
}
299300
if !fi.IsDir() {

0 commit comments

Comments
 (0)