Skip to content

[Migrate] protected item id to target object id (CUSTOMER REPORTED BUG)#10056

Open
saifaldin14 wants to merge 48 commits into
Azure:mainfrom
saifaldin14:main
Open

[Migrate] protected item id to target object id (CUSTOMER REPORTED BUG)#10056
saifaldin14 wants to merge 48 commits into
Azure:mainfrom
saifaldin14:main

Conversation

@saifaldin14

Copy link
Copy Markdown
Contributor

For the migrate command we need to rename the protected item id parameter to target object id

Copilot AI review requested due to automatic review settings June 30, 2026 23:30
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 30, 2026

Copy link
Copy Markdown
❌Azure CLI Extensions Breaking Change Test
❌migrate
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate migrate local start-migration cmd migrate local start-migration update parameter protected_item_id: updated property options from ['--id', '--protected-item-id'] to ['--id', '--target-object-id'] please change property options from ['--id', '--target-object-id'] to ['--id', '--protected-item-id'] for parameter protected_item_id of cmd migrate local start-migration

@azure-client-tools-bot-prd

Copy link
Copy Markdown

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.

@saifaldin14 saifaldin14 changed the title Rename protected item id to target object id [Migrate] protected item id to target object id (CUSTOMER REPORTED BUG) Jun 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the az migrate local start-migration command surface to use --target-object-id (instead of --protected-item-id) and propagates that rename through the extension’s parameter wiring, help text, and unit tests.

Changes:

  • Renamed the start-migration CLI option from --protected-item-id to --target-object-id (keeping --id).
  • Updated the runtime validation error message to reference --target-object-id.
  • Updated help examples and unit test expectations to match the new flag name.

Reviewed changes

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

File Description
src/migrate/azext_migrate/_params.py Renames the CLI option for migrate local start-migration to --target-object-id.
src/migrate/azext_migrate/custom.py Updates the missing-parameter CLIError message to reference --target-object-id.
src/migrate/azext_migrate/_help.py Updates help parameter name and examples to use --target-object-id.
src/migrate/azext_migrate/tests/latest/test_migrate_commands.py Updates unit tests to assert the new --target-object-id error text.

Comment on lines 261 to 263
'protected_item_id',
options_list=['--protected-item-id', '--id'],
options_list=['--target-object-id', '--id'],
help='The full ARM resource ID of the protected item to migrate. '
Comment thread src/migrate/azext_migrate/tests/latest/test_migrate_commands.py Outdated
)

self.assertIn("--protected-item-id parameter must be provided",
self.assertIn("--target-object-id parameter must be provided",
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yonzhan yonzhan requested a review from necusjz July 1, 2026 00:53
@yonzhan

yonzhan commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Migrate

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.

4 participants