Open crazy-max opened 5 months ago
This seems to be an artifact of a few different systems that likely need to be refactored coming together to cause the output to not be displayed.
First, there's two ways the details get printed. First, if it's a successful build, we have this part: https://github.com/docker/buildx/blob/68076909b925af8ad12f845ccbd4a6713127c998/commands/build.go#L363
This line is never hit on a failure. Instead, there's some special code to handle the display output. runBasicBuild
will wrap the error in a special error type here: https://github.com/docker/buildx/blob/68076909b925af8ad12f845ccbd4a6713127c998/build/build.go#L460-L468. This error gets eventually printed here: https://github.com/docker/buildx/blob/68076909b925af8ad12f845ccbd4a6713127c998/cmd/buildx/main.go#L109-L111
I currently suspect that the reason this doesn't work with the controller build is because it serializes the error over GRPC and this specific error doesn't deserialize over GRPC.
It might be possible to fix that, but it also seems problematic that there is such a seemingly convoluted and different path for printing the build details depending on a success or failure. It might be nice if printing the build details was done in a more consistent manner. I'll look into an appropriate way to do that.
We're going to take a look at this when we go and review the controller and its use cases. It seems like doing that is a better use of time than to fix individual bugs related to the controller. Since the controller is only activated through turning on experimental and this bug isn't a thing that prevents usage of the command, we'll leave it alone for now.
If someone runs into this and it's really bothering them and they want it fixed, please make a comment on this issue so we know to change our plans on this.
related to https://github.com/docker/buildx/pull/2376#discussion_r1547788058
Build details link is not displayed for a build that fails through controller: https://github.com/docker/buildx/actions/runs/8522265808/job/23342157852?pr=2376#step:7:771
Works without experimental mode enabled:
But not displayed when enabled: