Skip to content

feat: Add job command to start sessions as batch jobs#68

Merged
eikek merged 7 commits intomainfrom
eikek/start-job
May 8, 2026
Merged

feat: Add job command to start sessions as batch jobs#68
eikek merged 7 commits intomainfrom
eikek/start-job

Conversation

@eikek
Copy link
Copy Markdown
Member

@eikek eikek commented Apr 17, 2026

This adds a new command job with following sub commands:

  • list list currently running jobs
  • start start a session as a job, requires the launcher id
  • stop stops a running job, requires the session name
  • logs show logs of a job

A "job" is a session run with session_mode=non_interactive. amalthea will create a k8s batch job from the session spec. The list command only selects these type of sessions.

It can be tested on this PR deployment: SwissDataScienceCenter/renku-data-services#1246

@eikek eikek requested review from Panaetius and olevski April 22, 2026 15:32
Copy link
Copy Markdown
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

Thanks Eike!

Comment thread src/cli/cmd/job/list.rs
Comment on lines +11 to +15
/// Listing jobs.
///
/// List currently running jobs.
#[derive(Parser, Debug)]
pub struct Input {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We can live with this for now but in the future we should add an optional flag to filter by project.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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 :-))

Comment thread src/httpclient/data.rs
Comment on lines +169 to +170
/// Error response can be either a concrete renku error, or an error
/// from the proxy/gateway then there is only a message field.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry this sucks. We should make the gateway errors be the same.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I added a PR to fix this:
SwissDataScienceCenter/renku-gateway#866

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But you dont have to wait for that pr. Go ahead with this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thank you 👍🏼

@eikek eikek merged commit 3c5960d into main May 8, 2026
5 checks passed
@eikek eikek deleted the eikek/start-job branch May 8, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants