Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/quantum/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b17
+++++++++++++++
* Fixed bug where Quantum workspace creation flow uses plain (JSON-serializable) primitive values instead of SDK enum objects in ARM-template deployment parameters, preventing serialization issues and test failures.

1.0.0b16
+++++++++++++++
* Removed deprecated ``--location``/``-l`` parameter from ``quantum execute``, ``quantum run``, ``quantum job submit``, ``quantum job cancel``, ``quantum job list``, ``quantum job output``, ``quantum job show``, ``quantum job wait``, ``quantum target list``, ``quantum workspace set``, and ``quantum workspace quotas`` commands.
Expand Down
12 changes: 9 additions & 3 deletions src/quantum/azext_quantum/operations/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ def _validate_storage_account(tier_or_kind_msg_text, tier_or_kind, supported_tie
f"Storage account {tier_or_kind_msg_text}{plural} currently supported: {tier_or_kind_list}")


def _enum_to_value(value):
# ARM deployment parameters must use plain string values, not enum objects.
import enum
return value.value if isinstance(value, enum.Enum) else value


def create(cmd, resource_group_name, workspace_name, location, storage_account, skip_role_assignment=False,
provider_sku_list=None, auto_accept=False, skip_autoadd=False):
"""
Expand Down Expand Up @@ -244,9 +250,9 @@ def create(cmd, resource_group_name, workspace_name, location, storage_account,
if storage_account_list:
for storage_account_info in storage_account_list:
if storage_account_info.name == storage_account:
storage_account_sku = storage_account_info.sku.name
storage_account_sku_tier = storage_account_info.sku.tier
storage_account_kind = storage_account_info.kind
storage_account_sku = _enum_to_value(storage_account_info.sku.name)
storage_account_sku_tier = _enum_to_value(storage_account_info.sku.tier)
storage_account_kind = _enum_to_value(storage_account_info.kind)
storage_account_location = storage_account_info.location
# Preserve the existing account's setting to avoid breaking customers
# who rely on shared-key auth/connection strings for that account.
Expand Down
2 changes: 1 addition & 1 deletion src/quantum/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# This version should match the latest entry in HISTORY.rst
# Also, when updating this, please review the version used by the extension to
# submit requests, which can be found at './azext_quantum/__init__.py'
VERSION = '1.0.0b16'
VERSION = '1.0.0b17'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down