feat: Add job command to start sessions as batch jobs#68
Conversation
| /// Listing jobs. | ||
| /// | ||
| /// List currently running jobs. | ||
| #[derive(Parser, Debug)] | ||
| pub struct Input {} |
There was a problem hiding this comment.
We can live with this for now but in the future we should add an optional flag to filter by project.
There was a problem hiding this comment.
Yes, that should be done! Currently I don't think there is an option in the API to filter by project. The session response contains the project id, but perhaps we want some filtering based on the project name. If so, making this more efficient probably means to enhance the api. I thought filtering by project id at the client is maybe not so useful, so I left it (for now one could pipe the output to jq and do the filtering… I know :-))
| /// Error response can be either a concrete renku error, or an error | ||
| /// from the proxy/gateway then there is only a message field. |
There was a problem hiding this comment.
Sorry this sucks. We should make the gateway errors be the same.
There was a problem hiding this comment.
I added a PR to fix this:
SwissDataScienceCenter/renku-gateway#866
There was a problem hiding this comment.
But you dont have to wait for that pr. Go ahead with this.
This adds a new command
jobwith following sub commands:listlist currently running jobsstartstart a session as a job, requires the launcher idstopstops a running job, requires the session namelogsshow logs of a jobA "job" is a session run with
session_mode=non_interactive. amalthea will create a k8s batch job from the session spec. Thelistcommand only selects these type of sessions.It can be tested on this PR deployment: SwissDataScienceCenter/renku-data-services#1246