fix: improve error message when daemon architecture doesn't match target#2520
Closed
niveshdandyan wants to merge 1 commit intobuildpacks:mainfrom
Closed
fix: improve error message when daemon architecture doesn't match target#2520niveshdandyan wants to merge 1 commit intobuildpacks:mainfrom
niveshdandyan wants to merge 1 commit intobuildpacks:mainfrom
Conversation
When a user attempts to build a builder or buildpack for a different architecture than the Docker daemon supports (e.g., building linux/amd64 on an arm64 Mac), the error message was not helpful. It only indicated that no target matched without explaining what was requested or how to resolve the issue. This commit improves the error message to: 1. List which targets were specified that couldn't match 2. Show the daemon's current os/architecture 3. Suggest using the --publish flag as a workaround Fixes #2428 Co-Authored-By: Claude (claude-opus-4-5) <noreply@anthropic.com> Signed-off-by: niveshdandyan <niveshdandyan@gmail.com>
ae0b7a2 to
90b7aff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the error message when a user attempts to build a builder or buildpack for a different architecture than the Docker daemon supports (e.g., building
linux/amd64on an arm64 Mac).Before:
After:
Changes
daemonTargetfunction inpkg/client/package_buildpack.goto provide a more informative error message that:--publishflag as a workaroundpkg/client/create_builder_test.goandpkg/client/package_buildpack_test.goto match the new error message formatTest plan
--target linux/amd64on an arm64 machine without--publishflag - should see improved error message🤖 Generated with Claude Code