Repository navigation
integration: build the whiteout-test image locally - #13735
Conversation
Build the image for TestIssue13030 locally using pkg/archive, instead of pulling the prebuilt ghcr.io/containerd/whiteout-test image. The image is built by appending layers generated with archive.WriteDiff on top of the busybox base image, served with the new testutil.ServeImage helper on a localhost HTTP registry, and pulled through the regular client.Pull path with WithPullUnpack. This removes the need to publish the multi-arch whiteout-test image, so the Dockerfile and Makefile added in PR 13704 are removed along with the image list entry. Assisted-by: Claude Fable 5 <[email protected]> Signed-off-by: Akihiro Suda <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR removes the dependency on a prebuilt whiteout-test image by building the necessary layers locally in TestIssue13030 using pkg/archive.WriteDiff, then serving the resulting manifest/config/layers from a lightweight localhost HTTP registry helper.
Changes:
- Add
pkg/testutil.ServeImageto serve OCI blobs over a minimal read-onlyv2-style HTTP registry for tests. - Update
TestIssue13030to build a derived image on top of BusyBox locally and pull it through the normalclient.Pull(..., WithPullUnpack)path. - Remove the previously maintained
integration/images/whiteout-testDockerfile/Makefile and theWhiteoutentry from the integration image list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/testutil/registry.go | Adds a simple httptest-backed registry helper for serving manifests/blobs to integration tests. |
| integration/client/container_linux_test.go | Reworks TestIssue13030 to build and serve the whiteout test image locally instead of pulling a published image. |
| integration/images/image_list.go | Removes the Whiteout image entry now that the test no longer pulls it. |
| integration/images/whiteout-test/Dockerfile | Removed (no longer needed since the image is built in-test). |
| integration/images/whiteout-test/Makefile | Removed (no longer needed since the image is built in-test). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| w.WriteHeader(http.StatusNotFound) | ||
| return | ||
| } | ||
| w.Header().Set("Content-Type", mediaType) |
There was a problem hiding this comment.
Can we move this inside the endpoint-branches themselves? And for the blob endpoint should not have any other media-type;
| w.Header().Set("Content-Type", mediaType) | |
| w.Header().Set("Content-Type", "application/octet-stream") |
Perhaps move the remaining bits as well; it's 3 lines of code, and makes it much clearer to scope it to the individual switch-branches.
There was a problem hiding this comment.
The L65 updates the mediaType. I think the code looks good right now.
|
/cherry-pick release/2.3 |
|
@AkihiroSuda: #13735 failed to apply on top of branch "release/1.7": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@AkihiroSuda: #13735 failed to apply on top of branch "release/2.0": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@AkihiroSuda: #13735 failed to apply on top of branch "release/2.2": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@AkihiroSuda: #13735 failed to apply on top of branch "release/2.3": DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Build the image for TestIssue13030 locally using pkg/archive, instead of pulling the prebuilt ghcr.io/containerd/whiteout-test image.
The image is built by appending layers generated with archive.WriteDiff on top of the busybox base image, served with the new testutil.ServeImage helper on a localhost HTTP registry, and pulled through the regular client.Pull path with WithPullUnpack. This removes the need to publish the multi-arch whiteout-test image, so the Dockerfile and Makefile added in PR #13704 are removed along with the image list entry.
Assisted-by: Claude Fable 5 [email protected]