kaniko
kaniko copied to clipboard
fix: cache extract fails on invalid symlinks
Fixes #3428 #3442
Description
Upon cache extraction, in case there is a broken symlink, both stat and mkdir will fail, resulting in cache extraction to fail.
Use lstat instead to not follow the broken symlink.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you review them:
- [ ] Includes unit tests
- [x] 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
Describe any changes here so maintainer can include it in the release notes, or delete this block.
Examples of user facing changes:
- kaniko adds a new flag `--registry-repo` to override registry