-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Provide a nicer image build failed message #20281
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
Conversation
Hey @filiptronicek , to test you could try using an image build that will fail, like this one: https://github.com/kylos101/gitpod-custom-image/tree/kylos101/build-fail |
@kylos101 thanks for sharing, I have been able to get this screen as well. What I was originally curious about is this image build screen without any logs, where the improved error message would be a very nice addition: For the purposes of testing this PR, your suggestion will be enough, though. Thanks! |
Oh, I see - have you tried deleting the image build pod, before logs start to stream? We might be able to enable debug with image-builder-mk3 too. I think that introduces a delay in the image build process, which might give us time to delete the imagebuild pod itself. |
Trying with Kyle's example I actually still get |
@filiptronicek maybe you're looking for this one gitpod/components/supervisor/pkg/supervisor/supervisor.go Lines 1603 to 1604 in 359934c
content inside update: but it's not always work well, like this one, it will show another message relates to pod sometimes
|
Thanks so much for sharing that, @mustard-mh, that's exactly what I was looking for (I originally thought we display the error we catch from the workspace starter).
Oh, that's a bummer. Do we have an issue for that? Feels like we should to make our error messages reliable |
@filiptronicek Searched, seems we don't have such issue |
@filiptronicek ws-manager will read content of
In case you need to investigate further |
@mustard-mh could you help me understand why we fail the image build as part of the supervisor's If so, we could make this work by communicating through the success channel not just the success state, but also some task identifier. If that matched the image build, we could trigger a special message. Edit: I think I found it:
|
Yes, when a headless task fails, we categorize it as a user error. I'm going to try with another message, adapted from your suggestion. Trying to keep it short to fit in all places we show these messages (wish we had a link shortener for the long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -468,6 +468,11 @@ func (c WorkspaceConfig) isDebugWorkspace() bool { | |||
return c.DebugWorkspaceType != api.DebugWorkspaceType_noDebug | |||
} | |||
|
|||
// isImageBuild returns true if the workspace is an image build. | |||
func (c WorkspaceConfig) isImageBuild() bool { | |||
return os.Getenv("BOB_DOCKERFILE_PATH") != "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Other config will read env when init, we should do it the same for isImageBuild to align with others

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out, fixed in e1b1d79
(#20281).
Description
Make the message you see when an image build fails nicer for humans, including the recommendation for
gp validate
.Related Issue(s)
Fixes ENT-724
How to test