Skip to content

Quantum: Remove deprecated location parameter#9908

Open
s-ddavydenko wants to merge 14 commits into
Azure:mainfrom
s-ddavydenko:remove_location
Open

Quantum: Remove deprecated location parameter#9908
s-ddavydenko wants to merge 14 commits into
Azure:mainfrom
s-ddavydenko:remove_location

Conversation

@s-ddavydenko
Copy link
Copy Markdown

@s-ddavydenko s-ddavydenko commented May 29, 2026

Summary

Removes the deprecated --location / -l parameter from job submission related commands.

Motivation

Now workspace initialization request ARM/ARG and gets location from there. The parameter was already marked deprecated and scheduled for removal.

Changes

  • Removed --location / -l from az quantum job command definitions and from the underlying operations/job.py functions.
  • Updated help text, examples, and the README to drop references to --location.
  • Bumped extension version in setup.py; added entry to HISTORY.rst.

Testing

  • All unit tests in src/quantum/azext_quantum/tests/latest pass locally (pytest).
  • Tested locally commands that exercises az quantum workspace set, workspace show, target list and job list without passing --location/-l, confirming the removal didn't break the end-to-end command flow

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

s-ddavydenko and others added 11 commits May 29, 2026 14:21
* Managed Network Fabric CLI updates for new 2026-01-15-preview API

* Managed Network Fabric CLI updates for new 2026-01-15-preview API

* NetworkCloud CLI for the 2026-05-01-preview API

* NetworkCloud CLI for the 2026-05-01-preview API

* retrigger checks
* Fix workspace create, tested

* Worspace set command improvements
…zure#9901)

* Fix --additional-data and --change-definition to accept free-form nested JSON

The --additional-data argument was defined as AAZObjectArg with no child
fields, causing 'Model AAZObjectArg has no field named safeFly' errors.
The --change-definition details field had the same issue, rejecting
ApiOperations payloads with 'no field named operations'.

Changes:
- Change additional_data from AAZObjectArg to AAZFreeFormDictArg
- Change change_definition.details from AAZObjectArg to AAZFreeFormDictArg
- Change corresponding AAZObjectType to AAZFreeFormDictType in builders
  and response schemas across create, update, show, and list
- Add content injection for additionalData in custom.py (same pattern as
  changeDefinition) to work around AAZ builder serialization limitation
- Add tests for SafeFly payload, links, and orchestration-tool arguments
- Bump version to 1.0.0b2

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Retrigger CI (transient GitHub 403 incident on prior run)

* Address PR nits: use 'is None' / 'is not None' for additional_data checks

Per review feedback, replace truthiness checks with explicit None checks so
that an explicitly provided empty dict {} is treated as a valid user-supplied
value rather than being silently dropped.

- _inject_additional_data_into_content: 'if not additional_data' -> 'is None'
- ChangeRecordCreate.pre_operations: 'if additional_data' -> 'is not None'
- ChangeRecordUpdate.pre_operations: same fix for consistency (duplicated pattern)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Henry Dai <henrydai@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@s-ddavydenko s-ddavydenko changed the title Remove deprecated location parameter Quantum: Remove deprecated location parameter May 29, 2026
@yonzhan yonzhan requested a review from necusjz May 29, 2026 23:32
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 29, 2026

Quantum

@s-ddavydenko s-ddavydenko marked this pull request as ready for review May 29, 2026 23:33
Copilot AI review requested due to automatic review settings May 29, 2026 23:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Removes the deprecated --location/-l parameter from Azure Quantum CLI commands and updates the extension’s tests and help text to reflect the new command shapes.

Changes:

  • Removed location parameters from several command operation functions (workspace, target, job).
  • Updated scenario/live tests to stop passing -l/--location (and updated expected error/help strings accordingly).
  • Updated CLI help examples and added release notes documenting the breaking change.

Reviewed changes

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

Show a summary per file
File Description
src/quantum/azext_quantum/tests/latest/test_quantum_workspace.py Updates workspace tests to remove -l/--location from workspace set invocations.
src/quantum/azext_quantum/tests/latest/test_quantum_targets.py Updates target scenario test to set workspace without -l/--location.
src/quantum/azext_quantum/tests/latest/test_quantum_jobs.py Updates job tests to remove -l/--location and adjusts expected usage strings.
src/quantum/azext_quantum/operations/workspace.py Removes location argument from workspace quotas and workspace set operation functions.
src/quantum/azext_quantum/operations/target.py Removes location argument from target list operation function.
src/quantum/azext_quantum/operations/job.py Removes location argument from multiple job operation functions and updates internal run -> submit call.
src/quantum/azext_quantum/_help.py Updates CLI help examples to remove -l/--location.
src/quantum/azext_quantum/_breaking_change.py Removes deprecation registrations now that --location is removed.
src/quantum/HISTORY.rst Adds release notes entry documenting the removal of --location/-l.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants