Skip to content

Conversation

@euanh
Copy link
Collaborator

@euanh euanh commented Feb 14, 2025

Motivation

The layering tests sometimes fail with 400 errors from the registry. This error could be caused by pulling the underlying base image from Docker Hub, although the logs do not give enough information to be certain.

We don't need to run the container image in order to check that the payload file is being layered correctly. This would avoid the need to pull swift:slim, reducing the risk of external systems causing test failures.

Modifications

Build the test image on scratch.
Instead of running the container and using cat to check the contents of /payload, create a container from the image and copy /payload out, without starting the container.

Result

The layering tests should be less susceptible to failures caused by external systems.

Test Plan

All tests continue to pass.

@euanh euanh added semver/none No version bump required. area/testing Improvements to tests. labels Feb 14, 2025
@euanh euanh changed the title tests: Build the layering test images on scratch to avoid pulling swi… tests: Build the layering test images on scratch to avoid pulling swift:slim Feb 14, 2025
@euanh euanh force-pushed the layering-test-from-scratch branch 2 times, most recently from 3d3b786 to 3c282c1 Compare February 14, 2025 13:00
@euanh euanh merged commit 2583f04 into apple:main Feb 14, 2025
36 checks passed
@euanh euanh deleted the layering-test-from-scratch branch February 14, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Improvements to tests. semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant