fix: Refactor LayersMap to correct old strange code behavior (#2066)

* fix: Correct flatten function in layers

- Added a test.
- Cache current image, track deletes in `whiteouts` as well as normal adds in `layers`.
- Fix ugly delete behavior of `layerHashCache`.
  Delete it when crerating a new snapshot.
- Slight cleanup in `snapshot.go`.
- Format ugly `WalkFS` function.

* fix: Add symbolic link changes  to Hasher and CacheHasher

* fix: Better log messages

* fix(ci): Integration tests

* fix(ci): Add `--no-cache` to docker builds

* fix(ci): Pass credentials for error integration test

* np: Missing .gitignore in `hack`

* np: Capitalize every log message

- Correct some linting.

* fix: Key function

- Merge only last layer onto `currentImage`.

* fix: Remove old obsolete `cacheHasher`
This commit is contained in:
Gabriel Nützi
2022-05-17 20:30:58 -04:00
committed by GitHub
parent 28432d3c84
commit 323e616a67
52 changed files with 475 additions and 275 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ func getStatFileContentUint64(filePath string) uint64 {
res, err := parseUint(trimmed, 10, 64)
if err != nil {
logrus.Errorf("unable to parse %q as a uint from Cgroup file %q", string(contents), filePath)
logrus.Errorf("Unable to parse %q as a uint from Cgroup file %q", string(contents), filePath)
return res
}