feat: create queue - #332
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new cloudos queue create workflow to the CLI, aligning queue creation options with the web UI (preset-based, from-scratch wizard/flags, and adding compute environments), backed by new queue API helpers and tests.
Changes:
- Adds queue creation and compute-environment management APIs in
cloudos_cli/queue/queue.py, including preset templates and workspace/queue CE limit handling. - Implements
cloudos queue createCLI with preset creation,--from-scratchwizard/flags, and--add-compute-envflow incloudos_cli/queue/cli.py. - Adds a comprehensive test suite and fixture JSON for queue creation flows.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_queue/test_create_queue.py | Adds unit + CLI integration tests covering presets, from-scratch creation, and add-compute-env flows. |
| tests/test_data/queue/create_queue_response.json | Adds fixture response used by queue create tests. |
| cloudos_cli/utils/errors.py | Introduces queue-related exceptions for clearer, actionable errors. |
| cloudos_cli/queue/queue.py | Adds preset templates and new Queue methods to create queues and add compute environments. |
| cloudos_cli/queue/cli.py | Adds queue create command and interactive wizard; extends execution platform handling. |
| cloudos_cli/queue/init.py | Updates package exports. |
| cloudos_cli/_version.py | Bumps version to 2.93.0. |
| CHANGELOG.md | Documents the new queue creation feature set for v2.93.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
dapineyro
left a comment
There was a problem hiding this comment.
Hi @danielboloc ! I've added some comments. In addition, there is no new documentation about the new functionality in the README.md
dapineyro
left a comment
There was a problem hiding this comment.
Hey @danielboloc ! you commented-out the direct code that triggers --from-scratch but not all the functions that are only used by the functionality. That doesn't look good. We have two options:
- Remove ALL
--from-scratchcode, not only the code you commented-out, but also the related functions that are no longer reached. And I would remove it. Commenting it is kind of useless having git that keeps track of all the changes. - Keep everything as normal code, and add
hidden=Trueas click option for--from-scratch(Also add a security check to show a message in case somebody uses --from-scratch, with a message like--from-scratch will be available soon.
To be honest, I prefer option 1 because is the cleanest and then we don't carry over code that in not necessary yet. However, given that you know how difficult was to develop that --from-scratch, if you think option 2 will save some noticeable time in the future, we can go for it too. You decide
Ah!, and very importantly: remove all mentions to --from-scratch from the README.md and CHANGELOG.md
Overview
Adds ability to create queues from CLI following the web UI process:
JIRA
Acceptance Criteria
Scenario 1 - Workspace admin creates a queue successfully
Scenario 2 - CLI exposes the same creation options as the UI
Creates queue with presets

Creates from scratch (interactive)





Scenario 3 - Create a queue with multiple compute environments
In the UI, you cannot create queue with multiple environments as a single step. You have to create the queue and it will have 1 CE, then you can add the next 2 (3 in total).
Create a queue
Add new CE to existing queue. The CE additions, follows the UI create from scratch. The CLI also uses the same. BUT, the api endpoint is not open to use apiKey, therefore this functionality is placed on hold.
Scenario 4 - Member is not permitted to create a queue
Scenario 5 - Created queue is usable by both admins and members
Scenario 6 - Workspace queue limit reached
CE limit reached
Queue limit reached

Scenario 7 - API server error during creation
DEV
Proof this feature/patch works in this environment
AZURE
Proof this feature/patch works in this environment
Interactive Analysis
Proof this feature/patch works in this environment
cloudos queue create --label "from_CLI_IA" --description "generated this queue from IA session cmd" --preset standard-stable✅ Initial self-review with AI agent