kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

fix: sourceImage's CreatedAt timestamp should not be included in cache key

Open mzihlmann opened this issue 4 months ago • 2 comments

https://github.com/GoogleContainerTools/kaniko/issues/3088#issuecomment-2404594157

doesn't fix #3088 but is related to that issue

Description

Currently the CreatedAt timestamp (and all other metadata) is included into kaniko's cache key, this means that if a new image is created with the exact same layers, it invalidates caches in all builds that use it as a base.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you review them:

  • [ ] Includes unit tests
  • [ ] Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • [ ] The code flow looks good.
  • [ ] Unit tests and or integration tests added.

Release Notes

  • kaniko cache learned to ignore CreatedAt field in base images

mzihlmann avatar Oct 10 '24 11:10 mzihlmann