Quantum: manage V2 workspace quota - #10229
Conversation
|
Hi v-elegacheva, |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Please fix CI issues |
…06-15-preview Regenerates the vendored azure-mgmt-quantum SDK against API version 2026-06-15-preview. Adds TargetQuotaAllocations and related model fields consumed by the --quota feature.
5ea045c to
97c2ab8
Compare
Adds --quota to 'az quantum workspace create' and 'az quantum workspace update' for managing V2 provider target quota allocations (targetQuotas). Preserves omitted values on update, treats zero as a literal allocation, and validates provider/target inputs.
1.0.0b21 was released upstream (az quantum job update), so bump to 1.0.0b22 and record the --quota / API version 2026-06-15-preview changes under a new HISTORY entry.
97c2ab8 to
c31bf3e
Compare
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds support in the Quantum CLI extension for managing V2 workspace provider target quota allocations via a new --quota parameter on workspace create/update, alongside a vendored control-plane SDK regeneration and extension version bump.
Changes:
- Added
--quotaargument parsing/validation and applied target quota allocations onto workspace providers duringaz quantum workspace createandaz quantum workspace update. - Updated workspace update implementation to support quota updates (and still optionally toggle API-key auth).
- Regenerated vendored
azure_mgmt_quantumSDK and updated ARM template API versions; bumped extension version and release notes.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/quantum/setup.py | Bumps extension package version to 1.0.0b22. |
| src/quantum/HISTORY.rst | Adds 1.0.0b22 release notes including --quota and API version note. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/operations/_operations.py | Updates default api-version used by generated request builders. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/models/_models.py | Adds TargetQuotaAllocations model and related fields on provider/offer models. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/models/init.py | Exposes new TargetQuotaAllocations model in package exports. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/aio/_configuration.py | Updates async client configuration default api-version doc/behavior. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/aio/_client.py | Updates async client docstring default api-version. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/_configuration.py | Updates sync client configuration default api-version doc/behavior. |
| src/quantum/azext_quantum/vendored_sdks/azure_mgmt_quantum/_client.py | Updates sync client docstring default api-version. |
| src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py | Adds unit tests for quota parsing/validation and quota application/update behavior. |
| src/quantum/azext_quantum/operations/workspace.py | Implements V2 gating and quota application in create/update flows. |
| src/quantum/azext_quantum/operations/templates/create-workspace-and-assign-role.json | Bumps workspace ARM template apiVersion and reference api-version. |
| src/quantum/azext_quantum/commands.py | Routes quantum workspace update to the new update handler. |
| src/quantum/azext_quantum/_params.py | Introduces QuotaAction argparse action and wires --quota into create/update. |
| src/quantum/azext_quantum/_help.py | Adds examples for create/update using --quota. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
…keys, refresh recordings - --quota now rejects repeated keys within a single flag instead of silently merging two targets; use one --quota per target. - Accept kebab-case/snake_case quota keys (case-insensitive) as aliases of camelCase; help/examples use kebab-case. - Reject non-integer (float) minute values instead of truncating. - Update control-plane test recordings to api-version 2026-06-15-preview.
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
…tants, rename raw
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
hello Ethan Yang (@necusjz) ! Could you please review this PR when you get a chance? Thank you for your time :) |
🤖 PR Validation —⚠️ Review suggested
Summary
Adds a new
--quotaargument toaz quantum workspace createandaz quantum workspace updatefor managing V2 provider target quota allocations.Changes
--quotaargument: repeatable--quotaacceptingkey=valuepairs or JSON (providerId, targetId, standardMinutesLifetime, highMinutesLifetime), with parse-time validation--quotais gated to V2 workspaces. The guard runs before any mutating ARM call. On update, it follows a read-only GET used to obtain the workspace kind, so V1 workspaces are rejected without mutation.2026-06-15-preview, addsTargetQuotaAllocationsand related model fieldsTesting
create --help/update --helpsurface--quota--quotawith a clear error and no mutationazdev styleandazdev linterpass