Skip to content

Conversation

@bewatersmsft
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 October 22, 2025 19:46
@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 fixes an issue where the base policy ID is incorrectly set when updating an Azure Firewall Policy using pipeline input. The fix extracts base policy information consistently whether the cmdlet receives input via parameter or pipeline.

Key Changes:

  • Added a new ExtractBasePolicy() helper method to properly handle base policy ID extraction from both parameter and pipeline input scenarios
  • Removed inline base policy handling logic that was causing the issue with piped input

Reviewed Changes

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

File Description
SetAzureFirewallPolicyCommand.cs Added ExtractBasePolicy() method to properly handle base policy ID extraction; replaced inline base policy handling with method call
AzureFirewallPolicyTests.ps1 Added test function to verify base policy is correctly preserved when updating policies via pipeline
AzureFirewallPolicyTests.cs Added test method wrapper to run the new PowerShell test scenario

@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

Document bug fix for AzureFirewallPolicy in version 7.22.1.
@isra-fel isra-fel enabled auto-merge (squash) October 27, 2025 03:12
@isra-fel
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@isra-fel isra-fel merged commit 45d15f9 into Azure:main Oct 27, 2025
12 checks passed
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.

3 participants