c8d: make the cache in classic builder work#46634
Conversation
87d76f6 to
749958b
Compare
|
|
6b77b95 to
aa643b7
Compare
c752016 to
c459fd1
Compare
c459fd1 to
124c716
Compare
4dfa49a to
fcd91e9
Compare
f2ce092 to
a520b8e
Compare
a520b8e to
c2ba48d
Compare
|
FYI, the validate failure is caused by splitting one integration-cli test into two separate ones. |
|
@vvoland oh! I saw that, but looks like I didn't comment; could you perhaps push a temporary commit similar to 7ed823e, so that we have the validate steps run? We can revert it after this is merged (we should have some option to allow skipping it in CI without having to make changes, but don't know what the best approach for that is with GitHub actions 😞) |
|
Done (lol, me pushing a commit made a review request on behalf of @rumpl) |
ee77bfc to
9db487f
Compare
laurazard
left a comment
There was a problem hiding this comment.
LGTM 🎉 (yaaaaaay)
Left a couple of nitpicky comments/questions but there's probably reason for things to be that way/they're not anywhere big enough to be a blocker.
| manifestDesc ocispec.Descriptor, | ||
| containerConfigDesc ocispec.Descriptor, | ||
| _ error, |
There was a problem hiding this comment.
Nice! Reads better than just having the function return (ocispec.Descriptor, ocispec.Descriptor, error)
9db487f to
5ed41d6
Compare
In order for the cache in the classic builder to work we need to: - use the came comparison function as the graph drivers implementation - save the container config when commiting the image - use all images to search a 'FROM "scratch"' image - load all images if `cacheFrom` is empty Signed-off-by: Djordje Lukic <djordje.lukic@docker.com> Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Consider only images that were built `FROM scratch` as valid candidates for the `FROM scratch` + INSTRUCTION build step. The images are marked as `FROM scratch` based by the classic builder with a special label. It must be a new label instead of empty parent label, because empty label values are not persisted. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Serialize ContainerConfig to content store and store its digest in label. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
5ed41d6 to
bdc7d0c
Compare

- What I did
Makes the cache in classic builder work with the containerd image store
In order for the cache in the classic builder to work we need to:
cacheFromis empty- How I did it
- How to verify it
$ make DOCKER_GRAPHDRIVER=overlayfs TEST_FILTER=TestBuildAddCurrentDirWithoutCache TEST_INTEGRATION_USE_SNAPSHOTTER=1 TEST_IGNORE_CGROUP_CHECK=1 test-integration$ make DOCKER_GRAPHDRIVER=overlayfs TEST_FILTER=TestBuildAddRemoteFileWithAndWithoutCache TEST_INTEGRATION_USE_SNAPSHOTTER=1 TEST_IGNORE_CGROUP_CHECK=1 test-integration$ make DOCKER_GRAPHDRIVER=overlayfs TEST_FILTER=TestBuildCopyDirButNotFile TEST_INTEGRATION_USE_SNAPSHOTTER=1 TEST_IGNORE_CGROUP_CHECK=1 test-integrationAnd many others.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)