Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

cache extract failure fails on invalidated symlinks #3428

@mzihlmann

Description

@mzihlmann

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 #3340

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions