-
Notifications
You must be signed in to change notification settings - Fork 4.1k
{FrontDoor} Upgrade Frontdoor from SDK-based to autorest #28473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
$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 |
There was a problem hiding this comment.
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.
Remove-AzResourceGroup -Name $env.ResourceGroupName | |
Remove-AzResourceGroup -Name $env.ResourceGroupName -Force |
Copilot uses AI. Check for mistakes.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
To the author of the pull request, |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.