Skip to content

[Backup] az backup restore files mount-rp: fetch ILR mount scripts via dedicated list action - #34073

Open
Himanshu Agarwal (hiaga) wants to merge 7 commits into
Azure:devfrom
hiaga:users/hiaga/ilr-mountscript-listapi
Open

Himanshu Agarwal (hiaga) wants to merge 7 commits into
Azure:devfrom
hiaga:users/hiaga/ilr-mountscript-listapi

Conversation

@hiaga

@hiaga Himanshu Agarwal (hiaga) commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

🤖 PR Validation — 🔄 Running

Breaking Changes Tests
️✔️ None 🔄 130/130

Related command

az backup restore files mount-rp

Description

Retrieve Instant Item Recovery (ILR) mount scripts through the dedicated ListInstantItemRecoveryOperationResult action instead of reading them from the provision operation-status response. This aligns the CLI with the service change that redacts iSCSI CHAP connection details from the broad ILR operation-status payload, so the mount credentials are only returned by the dedicated action.

This bumps azure-mgmt-recoveryservicesbackup from ~=9.2.0 to ~=11.1.0. That SDK unifies the previously split activestamp/passivestamp client namespaces into a single azure.mgmt.recoveryservicesbackup client and switches enum members to upper-case, so the backup module imports and enum references were migrated accordingly. Cross Region Restore models that are not present in the new package are guarded so the module continues to import.

Note: the new list_instant_item_recovery_operation_result operation takes resource_group_name before vault_name (new ARM ordering), whereas the existing provision/revoke operations keep vault_name first. The call uses keyword arguments to make this explicit, and a unit test binds the call against the installed SDK signature to guard against future parameter reordering.

Testing

Added unit tests covering the provision -> list flow, the active-session renewal path, and a signature-binding guard against the installed SDK.

History Notes

[Backup] az backup restore files mount-rp: Fetch ILR mount scripts through the dedicated list action for CHAP credential redaction.

…a dedicated list action

Retrieve Instant Item Recovery (ILR) mount scripts through the dedicated
ListInstantItemRecoveryOperationResult action instead of reading them from the
provision operation-status response, so iSCSI CHAP connection details are no
longer exposed in the broad ILR status payload.

Bump the azure-mgmt-recoveryservicesbackup dependency from ~=9.2.0 to ~=11.1.0
and migrate the backup module to the unified client namespace (the
activestamp/passivestamp split was removed) and the uppercase enum members.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
Copilot AI lite review requested due to automatic review settings September 14, 2026 03:08
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@yonzhan

Copy link
Copy Markdown
Collaborator

Backup

setup.py now requires ~=11.1.0 for the ILR list-action flow, but the frozen
requirements.py3.*.txt files still pinned ==9.2.0, causing ResolutionImpossible
in azdev CI. Align all three platform requirement files with setup.py.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8

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.

🟡 Changes recommended

Packaged CLI requirement files still pin SDK 9.2.0 and must be updated to 11.1.0.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates az backup restore files mount-rp to retrieve ILR mount scripts through the dedicated action and migrates Azure Backup to SDK 11.1.0.

Changes:

  • Migrates Backup SDK clients, imports, models, and enums.
  • Adds dedicated ILR script retrieval and renewal-flow tests.
  • Updates dependency metadata and release history.
File summaries
File Summary
src/azure-cli/setup.py Updates the SDK dependency; platform requirement files still pin 9.2.0 (critical finding, 3 votes).
src/azure-cli/HISTORY.rst Documents the ILR change.
src/azure-cli/azure/cli/command_modules/backup/tests/latest/test_backup_commands.py Adds ILR flow and SDK signature tests.
src/azure-cli/azure/cli/command_modules/backup/custom.py Retrieves scripts through the dedicated list action.
src/azure-cli/azure/cli/command_modules/backup/custom_wl.py Migrates workload backup SDK usage.
src/azure-cli/azure/cli/command_modules/backup/custom_help.py Updates ILR status and operation handling.
src/azure-cli/azure/cli/command_modules/backup/custom_common.py Migrates shared SDK usage.
src/azure-cli/azure/cli/command_modules/backup/custom_base.py Migrates client and enum references.
src/azure-cli/azure/cli/command_modules/backup/custom_afs.py Migrates Azure Files SDK usage.
src/azure-cli/azure/cli/command_modules/backup/_validators.py Migrates storage enum usage.
src/azure-cli/azure/cli/command_modules/backup/_client_factory.py Uses the unified Backup SDK client.
Review details
  • Files reviewed: 14/14 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/azure-cli/setup.py
'azure-mgmt-rdbms==10.2.0b17',
'azure-mgmt-mysqlflexibleservers==1.1.0b3',
'azure-mgmt-recoveryservicesbackup~=9.2.0',
'azure-mgmt-recoveryservicesbackup~=11.1.0',

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.

Incorrect, all 3 are updated.

@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

# Conflicts:
#	src/azure-cli/azure/cli/command_modules/backup/custom.py
#	src/azure-cli/azure/cli/command_modules/backup/custom_afs.py
#	src/azure-cli/azure/cli/command_modules/backup/custom_base.py
#	src/azure-cli/azure/cli/command_modules/backup/custom_help.py
#	src/azure-cli/requirements.py3.Darwin.txt
#	src/azure-cli/requirements.py3.Linux.txt
#	src/azure-cli/requirements.py3.windows.txt
#	src/azure-cli/setup.py
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

… kwarg

Live re-recorded backup CLI cassettes at api-version 2026-08-01 (SQL wl
policy/protectable_item/rp/protection/restore/restore_as_files/crr,
multiple_containers, and prior VM/AFS/soft-delete suites). Fixes the
SDK 11.1.0 keyword-only regression in custom_afs.py (filter=filter_string).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

…ing multi-day setup

sql_archive requires VaultArchive recovery points that need multi-day archive
aging, and source_scan_recovery_points requires recovery points with completed
Defender-for-Cloud threat scanning (~48h). Both are skipped with a clear reason
and will be re-recorded against the 2026-08-01 API version once the setups are
ready. Config-plane source-scan enable/disable remains covered.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

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

Copilot-Session: 6d420238-f921-4e0f-ac6d-9acd4ed164b8
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

This branch has not been deployed

No deployments
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.

6 participants