Skip to content

integration: build the whiteout-test image locally - #13735

Merged
fuweid merged 1 commit into
containerd:mainfrom
AkihiroSuda:whiteout-test
Jul 31, 2026
Merged

fuweid merged 1 commit into
containerd:mainfrom
AkihiroSuda:whiteout-test

Conversation

@AkihiroSuda

Copy link
Copy Markdown
Member

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]

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]>
Copilot AI review requested due to automatic review settings July 8, 2026 14:41
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Jul 8, 2026
@AkihiroSuda AkihiroSuda added cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch cherry-pick/2.3.x Change to be cherry picked to release/2.3 kind/test labels Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ServeImage to serve OCI blobs over a minimal read-only v2-style HTTP registry for tests.
  • Update TestIssue13030 to build a derived image on top of BusyBox locally and pull it through the normal client.Pull(..., WithPullUnpack) path.
  • Remove the previously maintained integration/images/whiteout-test Dockerfile/Makefile and the Whiteout entry 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.

Comment thread pkg/testutil/registry.go Resolved
Comment thread pkg/testutil/registry.go Resolved
@AkihiroSuda
AkihiroSuda requested a review from henry118 July 10, 2026 06:19

@henry118 henry118 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks

@AkihiroSuda
AkihiroSuda requested review from a team July 22, 2026 05:23
Comment thread pkg/testutil/registry.go
w.WriteHeader(http.StatusNotFound)
return
}
w.Header().Set("Content-Type", mediaType)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this inside the endpoint-branches themselves? And for the blob endpoint should not have any other media-type;

Suggested change
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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The L65 updates the mediaType. I think the code looks good right now.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 31, 2026
@fuweid
fuweid added this pull request to the merge queue Jul 31, 2026
Merged via the queue into containerd:main with commit 2600710 Jul 31, 2026
89 of 90 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jul 31, 2026
@AkihiroSuda

Copy link
Copy Markdown
Member Author

/cherry-pick release/2.3
/cherry-pick release/2.2
/cherry-pick release/2.0
/cherry-pick release/1.7

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@AkihiroSuda: #13735 failed to apply on top of branch "release/1.7":

Applying: integration: build the whiteout-test image locally
Using index info to reconstruct a base tree...
M	integration/client/container_linux_test.go
M	integration/images/image_list.go
A	integration/images/whiteout-test/Dockerfile
A	integration/images/whiteout-test/Makefile
Falling back to patching base and 3-way merge...
CONFLICT (rename/delete): integration/images/whiteout-test/Dockerfile renamed to Makefile.darwin in HEAD, but deleted in integration: build the whiteout-test image locally.
CONFLICT (modify/delete): Makefile.darwin deleted in integration: build the whiteout-test image locally and modified in HEAD.  Version HEAD of Makefile.darwin left in tree.
Auto-merging integration/client/container_linux_test.go
CONFLICT (content): Merge conflict in integration/client/container_linux_test.go
Auto-merging integration/images/image_list.go
CONFLICT (content): Merge conflict in integration/images/image_list.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 integration: build the whiteout-test image locally

Details

In response to this:

/cherry-pick release/2.3
/cherry-pick release/2.2
/cherry-pick release/2.0
/cherry-pick release/1.7

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.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@AkihiroSuda: #13735 failed to apply on top of branch "release/2.0":

Applying: integration: build the whiteout-test image locally
Using index info to reconstruct a base tree...
M	integration/client/container_linux_test.go
M	integration/images/image_list.go
A	integration/images/whiteout-test/Dockerfile
A	integration/images/whiteout-test/Makefile
Falling back to patching base and 3-way merge...
CONFLICT (rename/delete): integration/images/whiteout-test/Dockerfile renamed to Makefile.freebsd in HEAD, but deleted in integration: build the whiteout-test image locally.
CONFLICT (modify/delete): Makefile.freebsd deleted in integration: build the whiteout-test image locally and modified in HEAD.  Version HEAD of Makefile.freebsd left in tree.
Auto-merging integration/client/container_linux_test.go
CONFLICT (content): Merge conflict in integration/client/container_linux_test.go
Auto-merging integration/images/image_list.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 integration: build the whiteout-test image locally

Details

In response to this:

/cherry-pick release/2.3
/cherry-pick release/2.2
/cherry-pick release/2.0
/cherry-pick release/1.7

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.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@AkihiroSuda: #13735 failed to apply on top of branch "release/2.2":

Applying: integration: build the whiteout-test image locally
Using index info to reconstruct a base tree...
M	integration/client/container_linux_test.go
M	integration/images/image_list.go
A	integration/images/whiteout-test/Dockerfile
A	integration/images/whiteout-test/Makefile
Falling back to patching base and 3-way merge...
CONFLICT (rename/delete): integration/images/whiteout-test/Dockerfile renamed to Makefile.freebsd in HEAD, but deleted in integration: build the whiteout-test image locally.
CONFLICT (modify/delete): Makefile.freebsd deleted in integration: build the whiteout-test image locally and modified in HEAD.  Version HEAD of Makefile.freebsd left in tree.
Auto-merging integration/client/container_linux_test.go
Auto-merging integration/images/image_list.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 integration: build the whiteout-test image locally

Details

In response to this:

/cherry-pick release/2.3
/cherry-pick release/2.2
/cherry-pick release/2.0
/cherry-pick release/1.7

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.

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@AkihiroSuda: #13735 failed to apply on top of branch "release/2.3":

Applying: integration: build the whiteout-test image locally
Using index info to reconstruct a base tree...
A	integration/images/whiteout-test/Dockerfile
A	integration/images/whiteout-test/Makefile
Falling back to patching base and 3-way merge...
CONFLICT (rename/delete): integration/images/whiteout-test/Dockerfile renamed to Makefile.freebsd in HEAD, but deleted in integration: build the whiteout-test image locally.
CONFLICT (modify/delete): Makefile.freebsd deleted in integration: build the whiteout-test image locally and modified in HEAD.  Version HEAD of Makefile.freebsd left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 integration: build the whiteout-test image locally

Details

In response to this:

/cherry-pick release/2.3
/cherry-pick release/2.2
/cherry-pick release/2.0
/cherry-pick release/1.7

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick/1.7.x Change to be cherry picked to release/1.7 branch cherry-pick/2.0.x Change to be cherry picked to release/2.0 branch cherry-pick/2.2.x Change to be cherry picked to release/2.2 branch cherry-pick/2.3.x Change to be cherry picked to release/2.3 kind/test size/L

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants