Skip to content

Conversation

@yifanz7
Copy link
Member

@yifanz7 yifanz7 commented Oct 21, 2025

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 Copilot AI review requested due to automatic review settings October 21, 2025 06:09
@azure-client-tools-bot-prd
Copy link

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

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 adds support for storage account planned failover in the Azure Storage PowerShell module, enhancing the existing failover functionality to include a new failover type parameter. The changes enable users to perform both planned and unplanned failovers while providing additional geo-replication statistics to help inform failover decisions.

Key changes:

  • Added a new FailoverType parameter to Invoke-AzStorageAccountFailover cmdlet with support for "Planned" and "Unplanned" options
  • Extended PSGeoReplicationStats model with three new properties: CanPlannedFailover, PostFailoverRedundancy, and PostPlannedFailoverRedundancy
  • Updated help documentation with new examples demonstrating planned and unplanned failover scenarios

Reviewed Changes

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

Show a summary per file
File Description
Invoke-AzStorageAccountFailover.md Updated cmdlet help to document the new FailoverType parameter and added examples for planned and unplanned failover scenarios
Get-AzStorageAccount.md Added new example showing geo-replication stats retrieval and corrected grammar in existing example titles
StorageAccountBaseCmdlet.cs Added AccountFailoverType struct to define Planned and Unplanned failover type constants
InvokeAzureStorageAccountFailover.cs Implemented FailoverType parameter, added failover type validation logic, and refactored execution into separate method
PSGeoReplicationStats.cs Extended model with three new geo-replication properties and refactored object initialization to use object initializer syntax
ChangeLog.md Added changelog entry documenting the new planned failover feature
StorageAccountTests.ps1 Added assertions to verify new geo-replication stats properties in test

@github-actions
Copy link

‼️ DO NOT MERGE THIS PR ‼️
This PR was labeled "Do Not Merge" because it contains code change that cannot be merged. Please contact the reviewer for more information.

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.

2 participants