--label
causes cache invalidation in later stages
#3088
Labels
area/caching
For all bugs related to cache issues
kind/bug
Something isn't working
priority/p1
Basic need feature compatibility with docker build. we should be working on this next.
works-with-docker
Actual behavior
A change in a
--label
value, causes cache invalidation for stages after the first one.Expected behavior
Caches are used as expected for a RUN command all stages, if there has been no changes to it.
To Reproduce
Steps to reproduce the behavior:
--cache --target stage-2 --label somelabel=1
`docker run -v "/tmp/config.json:/kaniko/.docker/config.json" -v $PWD:/workspace2 gcr.io/kaniko-project/executor:debug --dockerfile /workspace2/docker/ubuntu-base-images/Dockerfile --no-push --context /workspace2/ --cache --cache-repo gitlab.catalyst.net.nz:4567/eugene/docker-images/kaniko-testing-cache --target stage-2 --label somelabel=6
2. run step 1 again and observe the cache being used for both stages:
--label somelabel=2
, then run the build again. You'll note the cache not being used for theRUN
in the second stage:Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: