Skip to content

Conversation

@IannGeorges
Copy link
Member

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings November 25, 2025 04:50
@azure-client-tools-bot-prd
Copy link

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copilot finished reviewing on behalf of IannGeorges November 25, 2025 04:53
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 pull request updates the Azure Data Protection PowerShell module to API version 2025-07-01, introducing the ability to rename blob containers during item-level restore operations for Azure Blob Storage and Azure Data Lake Storage. The main enhancement is a new -RenameTo parameter for the Initialize-AzDataProtectionRestoreRequest cmdlet.

Key Changes:

  • Added -RenameTo parameter for container renaming during alternate location item-level restore
  • Updated API version from 2025-02-01 to 2025-07-01 across all namespaces
  • Comprehensive test coverage for the new rename functionality with validation of renamed containers and prefix matching
  • Updated help documentation for all affected cmdlets

Reviewed changes

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

Show a summary per file
File Description
Initialize-AzDataProtectionRestoreRequest.ps1 Added RenameTo parameter and logic to support container renaming during ILR
BlobHardeningScenario.Tests.ps1 Added comprehensive test validation for renamed containers and prefix matching
AdlsBlobHardeningScenario.Tests.ps1 Added test coverage for ADLS renamed container functionality
New-AzDataProtectionBackupVault.ps1 Identity handling refactored; contains debug logging that needs removal
README.md (Autorest) Updated API version reference and added x-ms-long-running-operation-options directives
All help/*.md files Updated type references from Api20250201 to Api20250701
All custom cmdlet files Updated namespace references to Api20250701
UX/*.json files Updated apiVersion to 2025-07-01
AssemblyInfo.cs Version bumped from 2.7.0 to 2.8.0

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.


$PSBoundParameters.Add("EncryptionSetting", $encryptionSettings)

Write-Host "Entering Az.DataProtection.Internal\New-AzDataProtectionBackupVault line 175"
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Debug logging statements should be removed before merging to production. These Write-Host statements appear to be leftover debugging code from development.

Suggested change
Write-Host "Entering Az.DataProtection.Internal\New-AzDataProtectionBackupVault line 175"

Copilot uses AI. Check for mistakes.

# Initialize Restore
$restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation $vault.Location -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetStorageAccId -ContainersList $backedUpContainers[0,1] -PrefixMatch $prefMatch
$restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDataLakeStorage -SourceDataStore VaultStore -RestoreLocation $vault.Location -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetStorageAccId -ContainersList $backedUpContainers[0,1] -PrefixMatch $prefMatch -RenameTo $renameTo
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

The DatasourceType parameter value is incorrect. It should be "AzureBlob" (as shown in the original code on line 120), not "AzureDataLakeStorage". This test is for blob hardening scenarios, not ADLS.

Copilot uses AI. Check for mistakes.
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.

1 participant