From bded1ff3bbb1a26adaacfda2fc91b4c5f72c685a Mon Sep 17 00:00:00 2001 From: Martin Zihlmann Date: Tue, 27 May 2025 23:49:55 +0100 Subject: [PATCH] drop warning again as empty layers are now handled properly --- pkg/executor/build.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkg/executor/build.go b/pkg/executor/build.go index c8dfcbc03..e693aa901 100644 --- a/pkg/executor/build.go +++ b/pkg/executor/build.go @@ -440,11 +440,6 @@ func (s *stageBuilder) build() error { // Raise Warnings for commands that are uncacheable switch command.(type) { - case *commands.RunCommand: - fi, err := os.Stat(tarPath) - if err == nil && fi.Size() <= emptyTarSize { - logrus.Warn("cache-violation: RUN created an empty layer, this will cause a diff when rebuilding from cache for the first time.") - } case *commands.WorkdirCommand: if len(files) > 0 { logrus.Warn("cache-violation: WORKDIR implicitly created a folder that can't be cached - consider creating it explicitly with RUN instead. https://github.com/GoogleContainerTools/kaniko/issues/3340")