kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

cache extract failure fails on invalidated symlinks

Open mzihlmann opened this issue 9 months ago • 0 comments

Actual behavior If a folder is created from cache over an invalid symlink, kaniko fails to create the directory

Expected behavior Build behaves the same whether it's from scratch or from cache

To Reproduce

FROM ubuntu

RUN mkdir /test \
    && ln -s /test /link

RUN rm -rf /test /link \
    && mkdir /link

WORKDIR /app

note that this will only fail on the second build, when we try to unpack the cache. WORKDIR is used to invalidate the cache https://github.com/GoogleContainerTools/kaniko/issues/3340

mzihlmann avatar Mar 22 '25 23:03 mzihlmann