Skip to content
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

Add new workspace condition "stoppedByRequest" #6213

Closed
2 of 3 tasks
jankeromnes opened this issue Oct 14, 2021 · 4 comments · Fixed by #6218
Closed
2 of 3 tasks

Add new workspace condition "stoppedByRequest" #6213

jankeromnes opened this issue Oct 14, 2021 · 4 comments · Fixed by #6218
Assignees

Comments

@jankeromnes
Copy link
Contributor

jankeromnes commented Oct 14, 2021

Bug description

When we call stopWorkspace with a StopWorkspaceRequest on some workspace, the stopped workspace should come back to the bridge with a new type of condition attached: for example called conditions.stoppedByRequest (in addition to the existing conditions timeout, failed and headlessTaskFailed).

This would allow cancelling prebuilds (because when a StopWorkspaceRequest is called on a prebuild a.k.a. headless workspace, we know that this is a manual cancellation, as the prebuild workspace wasn't left to run until completion or timeout).

This would help unblock the cancellable prebuilds PR: #5865 where we currently:

  • Stop the workspace (but just doing that currently leads to a "successful" Prebuild, which shows up in green in the UI and not in red as expected)
  • Set prebuild.state = 'aborted' immediately from the server, which seems to work on the surface, but is risky (because prebuild.state could get modified again by the bridge later when the workspace eventually stops)
  • Once the new stoppedByRequest condition is implemented, we'd be able to look out for that on prebuild workspaces in the bridge and set the correct prebuild.state.

Steps to reproduce

N/A

Workspace affected

No response

Expected behavior

No response

Example repository

No response

Anything else?

No response

@AlexTugarev
Copy link
Member

Just for completeness, let's not call this "manual cancellation" but just generic "cancellation" in code, or prepare a field for a reason. Any further improvements towards of prebuild queues would also require to "skip" even potentially running prebuilds, thus cancellation might be requested.

@csweichel
Copy link
Contributor

/schedule

@roboquat
Copy link
Contributor

@csweichel: Issue scheduled in the workspace team (WIP: 0)

In response to this:

/schedule

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@csweichel
Copy link
Contributor

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants