drop warning again as empty layers are now handled properly

This commit is contained in:
Martin Zihlmann 2025-05-27 23:49:55 +01:00
parent d17896c13f
commit bded1ff3bb
No known key found for this signature in database
GPG Key ID: 0F7784F41354DE99
1 changed files with 0 additions and 5 deletions

View File

@ -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")