-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[dashboard] Show prebuild status based on prebuild workspace record #8805
Conversation
e49a30b
to
7ebe21f
Compare
/werft run 👍 started the job as gitpod-build-mp-pb-status.7 |
@gtsiolis The current way we report the underlying error (next to the status) is a bit ugly. Do you have thoughts on what we could do here? For now, we only have a string as the error but I'm working on making this a bit richer as well. Co-related: The statuses we have here don't always convey well. For example, we show |
Ah, good old staging not working again. Will take a look either later or next week (hols Thu /Fri) |
@andrew-farries I've rebased and re-deployed this branch, I've also run the above tests and I've been able to reproduce the desired changes |
/werft run 👍 started the job as gitpod-build-mp-pb-status.9 |
} | ||
|
||
// Deprecated. Use PrebuildStatus instead. | ||
export function PrebuildInstanceStatus(props: { prebuildInstance?: WorkspaceInstance; prebuild?: PrebuildWithStatus }) { |
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.
I see, it's still used in ConfigureProject component. OK
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.
Works as advertised!
Thanks!
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.
This is fantastic, many thanks @easyCZ! 👏
Code changes also look good to me, and the PR seems to work as advertised. 🎯
@gtsiolis Would you like to review the "How it looks" screenshots in the PR description? 😁 (Personally, this looks good to me and is already better than what we have today in production, so we could also merge this and make any adjustments in follow-ups. 💭)
Co-authored-by: Jan Keromnes <[email protected]>
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.
Re-approving post nit-fix ✅
/unhold |
Taking a look now! 👀 But feel free to merge this as is. |
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.
I'm late here but left some comments we could have addressed in this iteration. Posted here in case we'd like to open follow up issues or PRs for these.
if (props.prebuild?.error) { | ||
return ( | ||
<span> | ||
The tasks executed in the prebuild returned a non-zero exit code. {props.prebuild.error} |
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.
question: This could be confusing. Could we use simpler words to describe the error. Maybe something like the following?
A task configured to run in the prebuild returned a non-zero exit code.
if (props.prebuild?.error) { | ||
return ( | ||
<span> | ||
The tasks executed in the prebuild returned a non-zero exit code. {props.prebuild.error} |
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.
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.
Definitely. I'm trying to clean it up incrementally as there's a lot of tech debt with respect where we collect the "truth" from. Unify first, then improve the messaging.
I'll cut a ticket for this concrete case to not show the same error twice.
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.
Unify first, then improve the messaging.
💯
I'll cut a ticket for this concrete case to not show the same error twice.
Thanks, @easyCZ! 🏀
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.
fyi: I've opened #9111 to keep track of this discussion and the unresolved comments below.
Prebuild has been cancelled. Either a user cancelled it, or the prebuild rate limit has been | ||
exceeded. {props.prebuild.error} |
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.
suggestion: Again, a simpler message here could help while dropping appending information that is already duplicated. WDYT?
Prebuild has been manually cancelled or prebuild rate limit has been reached.
function PrebuildStatusDescription(props: { prebuild: PrebuildWithStatus }) { | ||
switch (props.prebuild.status) { | ||
case "queued": | ||
return <span>Prebuild is queued and will be processed when there is execution capacity.</span>; |
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.
thought: Sounds accurate but a bit scary for humans, no? Maybe we could use something like the following:
Prebuild is queued and will be processed in a moment.
case "timeout": | ||
return ( | ||
<span> | ||
Prebuild timed out. Either the image, or the prebuild tasks took too long. {props.prebuild.error} |
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.
suggestion: Maybe the following suffices?
Prebuild timed out because the image or prebuild tasks took too long.
Optiontally, we could append some information about the max prebuild limit.
Prebuild timed out because the image or prebuild tasks took too long. Maximum prebuild duration is 1 hour.
Thanks for the feedback. That makes sense. From my perspective, I'd be interested in exposing the full error message but possibly it can be inside (by default) collapsed component. Surfacing the information does allow us to get better feedback on the errors from users and be able to address them. WDYT @gtsiolis? My intention for follow-up PRs is to clean-up the errors the server provides such that we treat them as "publicly facing errors" and include actionable feedback.
On the topic of these, the error message should really come directly from the backend. We're entering a world where workspace features can configurable and in that case only the backend will be authoritative over what the timeout (or other properties) actually are. I think we'll see us move away more from the UI having the error text and more it being sourced directly from the DB as a user facing error. |
Fully agree on beng able to see the full error message. However, we can mask the form of the error on the elements that do not scale well with long error messages and use the full error message on areas that scale better like the logs output. For example, currently the time out error easily breaks out of the one sentence limit and also introduces long message that is hard to parse and includes duplicate information (see 01h00m). 🍊 🍊 🍊 🍊
Looking forward for this one, @easyCZ! Feel free to loop me in if you need any more feedback on this. 🍋 🍋 🍋 🍋
Also, fully agree. But still masking the type of the error or including a short version of the error message could help to include in small areas like here or in tooltips could be useful.
Sounds good! 🙏 |
Now that this is merged, shall we close any of the related issues linked in the PR description? |
Thanks for the follow-up @gtsiolis. I believe we can action it as follows:
I'll go and close the first now. |
Thanks, @easyCZ! 🙏 |
Description
Currently, the Prebuild detail view (with logs and status) uses the
WorkspaceInstance
status. This is inconsistent with respect to the Prebuild List view. This PR uses theprebuild
status instead of status from theWorkspaceInstance
.This PR does not remove all instances of this inconcistent usage (another in ConfigureProject.tsx). It will be removed in a subsequent PR.
Related Issue(s)
How to test
Release Notes
Documentation
How it looks
Open questions
/hold