Skip to content

feat(site): add workspace health badge to workspace list #8387

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

Closed
wants to merge 1 commit into from

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Jul 10, 2023

Fixes #6461


Todo:

  • Popover/hover with reason
  • Test cases

This PR introduces the following UI change:

image
  • The "other" workspace is unhealthy because the agent is disconnected/shut down (docker stop container)
  • The "work" workspace is unhealthy because the startup script exited with an error

> = ({ workspace, className }) => {
return (
<Maybe
condition={["starting", "running", "stopping"].includes(
Copy link
Member Author

Choose a reason for hiding this comment

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

Review: Should we modify the API endpoint instead and do this on the API so that workspace.health = null when it's not possible to know (e.g. stopped workspace)?

icon={workspace.health.healthy ? <FavoriteIcon /> : <ErrorIcon />}
text={workspace.health.healthy ? "Healthy" : "Unhealthy"}
type={workspace.health.healthy ? "success" : "warning"}
/>
Copy link
Member Author

Choose a reason for hiding this comment

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

Should we use the popover component here when healthy = false?

@matifali
Copy link
Member

When can a workspace be Running but not healthy? What does it mean?
If a process (build/simulation) is running in a running but not healthy workspace, does it mean that the process is still running?

@mafredri
Copy link
Member Author

When can a workspace be Running but not healthy? What does it mean?
If a process (build/simulation) is running in a running but not healthy workspace, does it mean that the process is still running?

It can mean different things, for instance:

  • 1/3 agents is no longer running (e.g. was shut down)
  • An agent had an issue starting (startup script error)
  • An agent lost connection (bad network, crashed, etc)

One option here is to eliminate the extra column, and replace Running with Healthy. But it's a tradeoff (e.g. future feature sorting by columns), search filters, etc. So I'm not sure we should go down that route.

@matifali
Copy link
Member

As far as I understand, In 3rd case, we can have an unhealthy workspace that still has a valuable process running, and restarting would make the user lose any progress.

We should allow reconnecting to such workspaces.

@mtojek mtojek requested a review from BrunoQuaresma July 10, 2023 15:17
@BrunoQuaresma
Copy link
Collaborator

@mafredri I'm planning to do this a bit differently if that is ok for you. I'm tracking this work here #8343

@mafredri
Copy link
Member Author

@mafredri I'm planning to do this a bit differently if that is ok for you. I'm tracking this work here #8343

Sounds good! I'll close this one in favor of it 👍🏻

@mafredri mafredri closed this Jul 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2023
@github-actions github-actions bot deleted the mafredri/feat-site-workspace-list-health branch January 11, 2024 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Running" on workspace list isn't helpful if the agent is disconnected
3 participants