Skip to content

Comments

Fix log message when buildpack doesn't satisfy target constraints for builder#1801

Merged
jkutner merged 4 commits intomainfrom
fix/log-message
Jul 10, 2023
Merged

Fix log message when buildpack doesn't satisfy target constraints for builder#1801
jkutner merged 4 commits intomainfrom
fix/log-message

Conversation

@natalieparellano
Copy link
Member

To recreate:

pack builder create test-log --config ./some-builder.toml

Where some-builder.toml reference base images that are linux/amd64 and also references a buildpack that has [[targets]]\n os = "windows" in buildpack.toml.

For the lifecycle we decided that printing as JSON would be clearer than any custom String() method we could provide.

Before

Error message looks like: ERROR: validating buildpacks: buildpack samples/hello-extensions@0.0.1 does not support target: (linux amd64, @)

After

Error message looks like: ERROR: validating buildpacks: unable to satisfy target os/arch constraints; build image: {"os":"linux","arch":"amd64","distribution":{}}, buildpack samples/hello-extensions@0.0.1: [{"os":"windows","arch":""}]

… builder

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano requested review from a team as code owners June 14, 2023 18:26
@github-actions github-actions bot added this to the 0.30.0 milestone Jun 14, 2023
@github-actions github-actions bot added the type/enhancement Issue that requests a new feature or improvement. label Jun 14, 2023
@natalieparellano natalieparellano mentioned this pull request Jun 14, 2023
5 tasks
Copy link
Member

@dfreilich dfreilich left a comment

Choose a reason for hiding this comment

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

I like the maybe 🤣

@dfreilich
Copy link
Member

I'll probably need to approve again after you fix thx pipeline

@jkutner jkutner enabled auto-merge June 20, 2023 15:58
@natalieparellano natalieparellano self-assigned this Jun 22, 2023
Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano
Copy link
Member Author

Ah well, I fixed the test expectation. This should go green now :)

@jkutner jkutner merged commit 3921f9e into main Jul 10, 2023
@jkutner jkutner deleted the fix/log-message branch July 10, 2023 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/enhancement Issue that requests a new feature or improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants