Feat: Adds interactive session creation and listing#300
Feat: Adds interactive session creation and listing#300l-mansouri wants to merge 32 commits intomainfrom
Conversation
danielboloc
left a comment
There was a problem hiding this comment.
thanks @l-mansouri
I have tested it in my local env, and I have some questions:
- Using
--table-columnswith--helpit just displays an empty table, but if I use--table-columns idfor example, it does show only the help. Could you please check what could happen?
-
In Scenario 2 of listing you are using
cloudos interactive-session list --table-columns status,name,owner,project,created_at,runtime,saved_at,cost,resources,backend,version, but these columns do not appear as options in the help section -
Could we change the
Typeof the sessions to not appear asawsRstudio,awsVSCode,awsJupyterNotebookraw values, and have them as in the Platform UI?
-
Could we change
--filter-owner-onlyto--filter-only-mineas in thejob listsubcommand? Or we could do the reverse, change the jobs one as this one, but let's have them unified in the option name -
--output-format csvdoes not show user name, maybe because it usesuser.name?
- Why the
jsonoutput format is limited to 10 sessions, but not csv? Why this limit?
- Should we do a check for instance type? I have added a non-existent type and it send the session
- Should we also add a new column for
spottype instances, either when creating the session or when listing it?
- The same as for --shutdown-in (how much time has left), --cost-limit (how much cost is left), --shared
thank you
dapineyro
left a comment
There was a problem hiding this comment.
Hey @l-mansouri ! Huge work here, that's why there are so many comments. But it looks great overall. Thanks!
| PROJECT_NAME: "cloudos-cli-tests" | ||
| CLOUDOS_URL: "https://cloudos.lifebit.ai" | ||
| run: | | ||
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 10m |
There was a problem hiding this comment.
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 10m | |
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 1m |
Why to keep it open 10m?
There was a problem hiding this comment.
because in 1 minute the session is not fully running. And also for the rest of the commands that will require this one to work
| PROJECT_NAME: "cloudos-cli-tests" | ||
| INSTANCE_TYPE: "Standard_D4as_v4" | ||
| run: | | ||
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 10m --execution-platform azure --instance $INSTANCE_TYPE |
There was a problem hiding this comment.
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 10m --execution-platform azure --instance $INSTANCE_TYPE | |
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 1m --execution-platform azure --instance $INSTANCE_TYPE |
| CLOUDOS_URL: "https://dev.sdlc.lifebit.ai" | ||
| PROJECT_NAME: "cloudos-cli-tests" | ||
| run: | | ||
| cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 10m |
There was a problem hiding this comment.
cloudos interactive-session create --cloudos-url $CLOUDOS_URL --apikey $CLOUDOS_TOKEN --workspace-id $CLOUDOS_WORKSPACE_ID --project-name "$PROJECT_NAME" --name ci_test_cli --session-type jupyter --shutdown-in 1m
Co-authored-by: dapineyro <45285897+dapineyro@users.noreply.github.com>
|
Thanks Dani and David, I should have addressed all your comments. @danielboloc regarding your questions:
2. the list of available columns is now added to the help text
3. you're right, it makes the table more human readable. I have implemented a mapping function
@dapineyro Thanks for spotting some of the left-overs of not-working implemenations! I have reviewed and tidied the README. |





Overview
This PR implements the first two commands of the
interactive sessionmodule of the CLI:listandcreate.JIRA
-LP-106300
Changes
Acceptance Criteria
LISTING
Scenario 1: Successfully list all IA sessions in the workspace
Scenario 2: Listed sessions can report the same information as the platform UI
Scenario 3: User can retrieve a specific page of results by providing page number and page-size
Scenario 4: User can navigate through pages interactively using the terminal
Screen.Recording.2026-03-18.at.12.13.37.mov
Scenario 5: Attempt to list IA sessions with invalid credentials
Scenario 6: User can filter sessions by status
Scenario 7: User can filter to display only their own sessions
Scenario 8: User can view archived sessions
Scenario 9: User can export session list in CSV format
Scenario 10: User can export session list in JSON format
Scenario 11: User can select specific columns to display in the table output
AZURE LISTING
CREATING
Scenario 1: Successfully create a new Jupyter IA session
Scenario 2: Successfully create a new VSCode IA session
Scenario 3: Successfully create a new RStudio IA session
Scenario 4: Successfully create a new Spark IA session
Scenario 5: Create a new IA session with custom instance type
Scenario 6: Create a new IA session with custom storage size
Scenario 7: Create a new IA session with spot instance flag
Scenario 8: Create a new IA session with shutdown timeout
Scenario 9: Create a new IA session with cost limit
Scenario 10: Create a new IA session with shared flag
Scenario 11: Create a new RStudio IA session with specific R version
Scenario 12: Create a new Spark IA session with custom master and worker configuration
Scenario 13: Create a new IA session with linked file explorer data
Scenario 14: Create a new IA session with linked S3 data
Scenario 15: Create a new IA session with mounted S3 data
Scenario 16: Create a new IA session with mounted file explorer data
<img width="1040" height="498" alt="Screenshot 2026-03-18 at 15 26 10" src="https://github.com/user-attachments/assets/48b4cd81-1c82

-4642-a431-ec153c092605" />
Scenario 17: Attempt to create a session with an unsupported session type
Scenario 18: Attempt to create a session with invalid credentials
Scenario 19: Attempt to create a session with missing required parameters
AZURE IA CREATION