Skip to content

feat: show queue position of pending workspace build #8244

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

Merged
merged 4 commits into from
Jun 28, 2023
Merged

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Jun 28, 2023

Fixes: #6465

This PR exposes the queue position of a pending workspace build. It implements the action items from the Build visibility RFC.

Screenshot 2023-06-28 at 13 36 01 Screenshot 2023-06-28 at 13 15 29

@mtojek mtojek self-assigned this Jun 28, 2023
@mtojek mtojek requested review from mafredri and spikecurtis June 28, 2023 11:48
@mtojek mtojek marked this pull request as ready for review June 28, 2023 11:49
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Very nice! Just a few minor comments and suggestions.

contact your administrator for assistance.
</div>
<div>
Position in queue:{" "}
Copy link
Member

Choose a reason for hiding this comment

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

Is the {" "} necessary here? I would imagine the newline becomes a space but maybe not in React-land.

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems to be necessary. Otherwise, it's merged together: Position in queue:3 (no space).

if (provisionerJob === undefined || provisionerJob.queue_size === 0) {
return t("workspaceStatus.pending", { ns: "common" })
}
return "Position in queue: " + provisionerJob.queue_position
Copy link
Member

Choose a reason for hiding this comment

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

Should we use t here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

I skipped this on purpose, as we are not going to implement translations. I learnt some time ago

@mtojek mtojek force-pushed the 6465-queue-size branch from c274414 to efe4928 Compare June 28, 2023 12:11
@mtojek mtojek merged commit 3dbc96d into main Jun 28, 2023
@mtojek mtojek deleted the 6465-queue-size branch June 28, 2023 12:49
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
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.

Pending workspace builds have an odd UX
2 participants