Skip to content

Quantum: V2 workspace support#9939

Draft
s-ddavydenko wants to merge 5 commits into
Azure:mainfrom
s-ddavydenko:v2_workspaces
Draft

Quantum: V2 workspace support#9939
s-ddavydenko wants to merge 5 commits into
Azure:mainfrom
s-ddavydenko:v2_workspaces

Conversation

@s-ddavydenko

@s-ddavydenko s-ddavydenko commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds --workspace-kind parameter to az quantum workspace create, allowing users to specify whether to create a V1 or V2 Azure Quantum workspace.

Motivation

V2 workspaces have a different architecture and must be explicitly requested at creation time. The service already supports this via the workspaceKind field in the REST API, but there was no way to set it from the CLI — users had to use the portal or call the API directly.

Changes

  • Updated workspace to pass workspace_kind through both code paths: the direct API path (--skip-role-assignment), and the ARM template path includes it as a workspaceKind parameter.
  • Updated the ARM template to accept and forward workspaceKind to the workspace resource properties, setting it to an empty string for a V1 workspace (legacy behavior) or V2 for a V2 workspace
  • Bumped version

Testing

  • All offline unit tests pass locally
  • Unit test added. Serializes the JSON created and checks V1 and V2 workspace kind for no breaking changes
  • Manually verified end-to-end via a temp file, created a V1 workspace by leaving workspaceKind as null, setting it to V1 and setting it to V2 against a personal Azure subscription

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 15, 2026

Copy link
Copy Markdown
⚠️Azure CLI Extensions Breaking Change Test
⚠️quantum
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd quantum workspace create cmd quantum workspace create added parameter workspace_kind

@yonzhan

yonzhan commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Quantum

@yonzhan yonzhan requested a review from necusjz June 16, 2026 00:06
@rigidit rigidit requested a review from Copilot June 16, 2026 23:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for creating Azure Quantum V2 workspaces via a new --workspace-kind argument on az quantum workspace create.

Changes:

  • Adds --workspace-kind CLI parameter and wires it through workspace creation code paths.
  • Updates the ARM template to pass workspaceKind when provided.
  • Bumps extension version and updates release notes; adds tests covering workspace kind serialization.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/quantum/setup.py Bumps package version to 1.0.0b17.
src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py Adds tests for workspace_kind model serialization behavior.
src/quantum/azext_quantum/operations/workspace.py Plumbs workspace_kind into workspace creation (SDK + ARM template parameters).
src/quantum/azext_quantum/operations/templates/create-workspace-and-assign-role.json Adds workspaceKind parameter and injects it into the workspace resource properties.
src/quantum/azext_quantum/_params.py Introduces --workspace-kind argument.
src/quantum/azext_quantum/_help.py Documents example usage for creating a V2 workspace.
src/quantum/HISTORY.rst Adds 1.0.0b17 changelog entry.

Comment thread src/quantum/azext_quantum/_params.py Outdated
Comment thread src/quantum/azext_quantum/_params.py
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The kind of workspace to create: V1 or V2. Empty string means the service default (V1)."
"providers": "[parameters('providers')]",
"storageAccount": "[parameters('storageAccountId')]"
"storageAccount": "[parameters('storageAccountId')]",
"workspaceKind": "[if(empty(parameters('workspaceKind')), json('null'), parameters('workspaceKind'))]"
Comment thread src/quantum/azext_quantum/operations/workspace.py
assert providers_selected[0] == {"provider_id": "foo", "sku": "foo_credits_for_all_plan", "offer_id": "foo_offer", "publisher_id": "foo0123456789"}

def test_workspace_kind(self):
print("test_workspace_kind")
Comment on lines +327 to +331
# V1 workspace: workspace_kind is None by default (field omitted from request, service defaults to V1)
props = WorkspaceResourceProperties()
assert props.workspace_kind is None
serialized = props.serialize()
assert serialized.get("workspaceKind") is None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants