Skip to content

Conversation

@saifaldin14
Copy link
Contributor

@saifaldin14 saifaldin14 commented Jan 13, 2026


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

Related command

az migrate get-discovered-server

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings January 13, 2026 21:44
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 13, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️migrate
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove migrate local replication list cmd migrate local replication list update parameter project_name: removed property id_part=name

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

Hi @saifaldin14,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 13, 2026

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>

@github-actions
Copy link

github-actions bot commented Jan 13, 2026

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 fixes edge case errors in the az migrate get-discovered-server command by improving handling of different API response formats and machine identification patterns.

Changes:

  • Updated source machine name field to use sourceVmName instead of sourceMachineName in protected item formatting
  • Added support for extracting machine names from full resource IDs
  • Enhanced server data handling to support both list and single-item API responses
  • Extended filtering and extraction logic to handle different API endpoint formats (Microsoft.Migrate vs Microsoft.OffAzure)

Reviewed changes

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

File Description
src/migrate/azext_migrate/helpers/replication/list/_execute_list.py Changed to use sourceVmName field from API response for source machine name
src/migrate/azext_migrate/helpers/_server.py Added resource ID parsing, enhanced response handling for single items vs lists, and improved data extraction for different API formats
src/migrate/azext_migrate/custom.py Integrated machine name extraction and removed OData filter (moved to client-side filtering)

@yonzhan yonzhan requested a review from kairu-ms January 14, 2026 00:51
@yonzhan yonzhan requested a review from jsntcy January 14, 2026 00:51
@necusjz necusjz merged commit 77c8abb into Azure:main Jan 14, 2026
24 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ migrate-3.0.0b3 ] : https://dev.azure.com/msazure/One/_build/results?buildId=149279443&view=results

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.

6 participants