Skip to content

Conversation

Ptnan7
Copy link
Member

@Ptnan7 Ptnan7 commented Aug 28, 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 August 28, 2025 00:30
Copy link

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

Copy link
Contributor

@Copilot 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 upgrades the Azure PowerShell FrontDoor module from SDK-based to AutoRest-generated implementation. The upgrade migrates the module to use auto-generated cmdlets and client libraries from OpenAPI specifications rather than hand-written SDK code.

  • Removes the SDK-based FrontDoor.Management.Sdk project
  • Adds new AutoRest-generated FrontDoor.Autorest project with complete test infrastructure
  • Implements comprehensive test suites for FrontDoor operations including WAF policies and rules engines

Reviewed Changes

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

Show a summary per file
File Description
src/FrontDoor/FrontDoor.Management.Sdk/FrontDoor.Management.Sdk.csproj Deleted SDK-based project file
src/FrontDoor/FrontDoor.Autorest/utils/Unprotect-SecureString.ps1 Added utility for converting SecureString to plaintext
src/FrontDoor/FrontDoor.Autorest/utils/Get-SubscriptionIdTestSafe.ps1 Added utility for test-safe subscription ID retrieval
src/FrontDoor/FrontDoor.Autorest/test/utils.ps1 Added comprehensive test utilities and environment setup functions
src/FrontDoor/FrontDoor.Autorest/test/loadEnv.ps1 Added test environment loading script
src/FrontDoor/FrontDoor.Autorest/test/env.json Added test environment configuration
src/FrontDoor/FrontDoor.Autorest/test/*.Tests.ps1 Added test files for FrontDoor operations
src/FrontDoor/FrontDoor.Autorest/test/*.Recording.json Added test recording files for playback
Comments suppressed due to low confidence (1)

src/FrontDoor/FrontDoor.Autorest/test/loadEnv.ps1:23

  • The line contains incorrect path syntax. '.$envFile' should be '..$envFile' to properly reference the parent directory. The current syntax will result in an invalid path like '.\env.json' instead of the intended '../env.json'.
    $envFilePath = Join-Path $PSScriptRoot '..\$envFile'

Import-Module -Name Az.Cdn

$env.SubscriptionId = (Get-AzContext).Subscription.Id
$env.Tenant = $res.Tenant.Id
Copy link
Preview

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

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

The variable '$res' is undefined. This line should likely use '(Get-AzContext).Tenant.Id' similar to line 115, or '$res' should be properly defined before use.

Suggested change
$env.Tenant = $res.Tenant.Id
$env.Tenant = (Get-AzContext).Tenant.Id

Copilot uses AI. Check for mistakes.

function cleanupEnv() {
# Clean resources you create for testing
Write-Host -ForegroundColor Green "Clean resources created for testing."
Remove-AzResourceGroup -Name $env.ResourceGroupName
Copy link
Preview

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

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

The Remove-AzResourceGroup command should include the -Force parameter to avoid interactive confirmation prompts during automated test cleanup. This ensures reliable test execution in CI/CD environments.

Suggested change
Remove-AzResourceGroup -Name $env.ResourceGroupName
Remove-AzResourceGroup -Name $env.ResourceGroupName -Force

Copilot uses AI. Check for mistakes.

@isra-fel
Copy link
Member

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@VeryEarly VeryEarly self-assigned this Aug 29, 2025
@VeryEarly VeryEarly added the Breaking Change Release This PR contains breaking change label Aug 29, 2025
Copy link

To the author of the pull request,
This PR was labeled "Breaking Change Release" because it contains breaking changes.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Release This PR contains breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants