-
Notifications
You must be signed in to change notification settings - Fork 41k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure diagnostics are poor when trying to use an image platform that is not supported by the builder #44059
Comments
The default builder, In Boot, we may at least be able to catch the mismatch when we try to pull a multi-arch image and receive a non-matching single-arch image instead. If so, we could fail fast with a more helpful error message. |
@piotrblasiak which buildpack do you need from |
Ok, thanks for letting me know. @dashaun I need it for the debugging tools. |
From the buildpack team:
We'll look at improving the diagnostics in Boot by detecting the fallback to the single-arch image that doesn't match the requested platform and failing fast.
You may want to track the Noble builders and consider using them in the future. #42711 is tracking Boot switching to Noble by default. |
The problem is in There we do this: if (statusCode >= 400 && statusCode <= 500) {
HttpEntity entity = response.getEntity();
Errors errors = (statusCode != 500) ? getErrorsFromResponse(entity) : null;
Message message = getMessageFromResponse(entity);
} as the status code is 404, we try to read the errors from the response. This consumes the http entity. When we call |
IIRC, when I was looking at this a few weeks ago, I thought it should be possible to detect the problem before we receive the 404. When the request for the multi-arch image is satisfied with a single-arch image, we should be able to check the image and fail at that point. That's before we make the request that results in a 404. |
Okay, I'll double check. I'll open a new issue for always including the message. |
We now check that the platform of the image is the same as the requested platform. If not, we fail with an exception with a useful error message:
|
We now try to pull linux/arm64. The image only exists for linux/amd64, which should throw the platform mismatch exception. See gh-44059
This is my pom:
And it fails:
The text was updated successfully, but these errors were encountered: