-
Notifications
You must be signed in to change notification settings - Fork 52
feat(ws): Implement workspace start + pause as backend APIs #340
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
base: notebooks-v2
Are you sure you want to change the base?
feat(ws): Implement workspace start + pause as backend APIs #340
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
fb2e2fb
to
f22b3d3
Compare
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.
8d5e467
to
3237336
Compare
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.
Some questions inline.
3237336
to
ba9e1bc
Compare
related: kubeflow#298 - Added StartWorkspaceHandler + PauseWorkspaceHandler to handle the respective workspace actions - Introduced new routes for starting and pausing workspaces in the API. - `api/v1/workspaces/{namespace}/{name}/actions/start` - `api/v1/workspaces/{namespace}/{name}/actions/pause` - Created a new PauseStateEnvelope type for successful responses. - Leveraging JSONPatch / client.RawPatch to ensure Workspace in "valid state" before attempting action - for `start`: `spec.paused` must be `true`, and `status.state` must be `Paused` - for `pause`: `spec.paused` must be `false` - note: I would love to have a `status.state` check here of `status.state != Paused`, but that type of comparison is not supported in [JSONPatch](https://datatracker.ietf.org/doc/html/rfc6902#section-4.6) - Added tests for the new APIs, including success and error cases. - Updated README/OpenAPI documentation to include the new endpoints. Signed-off-by: Andy Stoneberg <[email protected]>
ba9e1bc
to
575e1a8
Compare
related: #298
api/v1/workspaces/{namespace}/{name}/actions/start
api/v1/workspaces/{namespace}/{name}/actions/pause
start
:spec.paused
must betrue
, andstatus.state
must bePaused
pause
:spec.paused
must befalse
status.state
check here ofstatus.state != Paused
, but that type of comparison is not supported in JSONPatchFunctionality tested/verified via generated Swagger client:
HAPPY PATH

ERROR PATH
