Skip to content

[DMS] az dms project create: Change location parameter to be optional#31465

Merged
necusjz merged 19 commits intoAzure:devfrom
temandr:users/arpavlic/update-help_remove-location
Nov 6, 2025
Merged

[DMS] az dms project create: Change location parameter to be optional#31465
necusjz merged 19 commits intoAzure:devfrom
temandr:users/arpavlic/update-help_remove-location

Conversation

@temandr
Copy link
Contributor

@temandr temandr commented May 13, 2025

Related command
az dms project create ...
az dms create ...

Description

  • Adjusting _help file to reflect more accurate inputs for the MySQL connection input and for the binlog_info.
  • Removing the location inputs per linter for az dms project create ... command and using the service to gather that information.
  • Adding a default option for the location for the service creation command. By default uses the resource group location.

Testing Guide
Re-ran tests with live input and adhoc tested az dms create ... and az dms project create ...


This checklist is used to make sure that common guidelines for a pull request are followed.

@temandr temandr requested a review from jsntcy as a code owner May 13, 2025 05:59
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented May 13, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

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

Hi @temandr,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@temandr temandr requested a review from sergb213 May 13, 2025 05:59
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented May 13, 2025

❌AzureCLI-BreakingChangeTest
❌dms
rule cmd_name rule_message suggest_message
1007 - ParaRemove dms project create cmd dms project create removed parameter location please add back parameter location for cmd dms project create
⚠️ 1009 - ParaPropRemove dms create cmd dms create update parameter location: removed property required=True

Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:

  • Breaking changes can only be merged during the designated breaking change window
  • A pre-announcement must be released at least one month in advance

For more details on how to introduce breaking changes, refer to the documentation: azure-cli/doc/how_to_introduce_breaking_changes.md

@yonzhan
Copy link
Collaborator

yonzhan commented May 13, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@temandr temandr requested a review from swjain23 May 13, 2025 06:00
@yonzhan yonzhan requested a review from kairu-ms May 13, 2025 07:10
@temandr temandr changed the title [DMS] BREAKING CHANGE: az dms (project) create now don't require the location parameter and correcting help inputs [DMS] BREAKING CHANGE: az dms (project) create now don't require the location parameter and correcting help inputs May 13, 2025
@temandr temandr changed the title [DMS] BREAKING CHANGE: az dms (project) create now don't require the location parameter and correcting help inputs [DMS] BREAKING CHANGE: az dms project create now doesn't require the location parameter and correcting help inputs May 16, 2025
@temandr temandr requested a review from sergb213 May 16, 2025 19:18
examples:
- name: Create an instance of DMS.
text: >
az dms create -l westus -n mydms -g myresourcegroup --sku-name Basic_2vCores --subnet /subscriptions/{vnetSubscriptionId}/resourceGroups/{vnetResourceGroup}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} --tags tagName1=tagValue1 tagWithNoValue
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we mention above that this parameter is available, although it is optional and it defaults to the resource group location? Since resource groups have global scope, someone may wish to create "MySQL migrations" resource group and add a few DMS services in multiple regions, for example. And it is not clear how this could be done from the help.

@evelyn-ys evelyn-ys changed the title [DMS] BREAKING CHANGE: az dms project create now doesn't require the location parameter and correcting help inputs [DMS] az dms project create: Change location parameter to be optional May 27, 2025
Copy link

@swjain23 swjain23 left a comment

Choose a reason for hiding this comment

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

Looks good to me

kairu-ms
kairu-ms previously approved these changes Jun 23, 2025
Copilot AI review requested due to automatic review settings August 9, 2025 17:20
@temandr temandr dismissed stale reviews from kairu-ms and evelyn-ys via ffcd99f August 9, 2025 17:20
@temandr temandr requested a review from necusjz as a code owner August 9, 2025 17:20
Copy link
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

This PR modifies the Azure CLI DMS (Database Migration Service) module to make the location parameter optional for the az dms project create command and the az dms create command. The changes enable automatic location detection from the associated DMS service or resource group instead of requiring explicit location specification.

  • Make location parameter optional for project creation by deriving it from the DMS service
  • Make location parameter optional for service creation by defaulting to resource group location
  • Update test cases to remove explicit location parameters from command invocations

Reviewed Changes

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

File Description
test_service_scenarios.py Updated test commands to remove explicit location parameters
custom.py Added location auto-detection logic and made location optional in service/project creation functions
_help.py Updated help documentation examples to remove location parameter usage
_client_factory.py Added resource groups client factory function for location retrieval

@yonzhan
Copy link
Collaborator

yonzhan commented Aug 9, 2025

Please fix CI issues

@necusjz
Copy link
Member

necusjz commented Nov 6, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@necusjz necusjz merged commit ab5124c into Azure:dev Nov 6, 2025
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants