-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix front door ternary operator issue #28831
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 migrates the FrontDoor module to AutoRest PowerShell V4 and ensures PowerShell 5.1 compatibility by replacing ternary operators with if-else blocks. Key changes include:
- Replaced PowerShell 7.0+ ternary operators with PowerShell 5.1-compatible if-else blocks in routing rule and rules engine cmdlets
- Updated help documentation URL casing
- Regenerated AutoRest artifacts (GUIDs, generate_Id)
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/FrontDoor/FrontDoor/help/New-AzFrontDoorBackendPoolsSettingObject.md | Updated online help URL with correct module name casing |
| src/FrontDoor/FrontDoor/Az.FrontDoor.psd1 | Updated generated date timestamp |
| src/FrontDoor/FrontDoor.sln | Regenerated project GUIDs for AutoRest project reference |
| src/FrontDoor/FrontDoor.Autorest/generate-info.json | Updated AutoRest generation identifier |
| src/FrontDoor/FrontDoor.Autorest/docs/Az.FrontDoor.md | Updated module GUID after regeneration |
| src/FrontDoor/FrontDoor.Autorest/custom/New-AzFrontDoorRulesEngineActionObject.ps1 | Replaced ternary operators with if-else blocks for PowerShell 5.1 compatibility |
| src/FrontDoor/FrontDoor.Autorest/custom/New-AzFrontDoorRoutingRuleObject.ps1 | Replaced ternary operators with if-else blocks for PowerShell 5.1 compatibility |
| external help file: Az.FrontDoor-help.xml | ||
| Module Name: Az.FrontDoor | ||
| online version: https://learn.microsoft.com/powershell/module/az.frontdoor/new-azfrontdoorbackendpoolssettingobject | ||
| online version: https://learn.microsoft.com/powershell/module/Az.FrontDoor/new-azfrontdoorbackendpoolssettingsobject |
Copilot
AI
Nov 7, 2025
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 URL contains a typo in the cmdlet name. The URL ends with "new-azfrontdoorbackendpoolssettingsobject" (with double 's' in "settingsobject"), but the correct cmdlet name is "New-AzFrontDoorBackendPoolsSettingObject" which should be lowercased to "new-azfrontdoorbackendpoolssettingobject" in the URL. There should be only one 's' between "setting" and "object".
| online version: https://learn.microsoft.com/powershell/module/Az.FrontDoor/new-azfrontdoorbackendpoolssettingsobject | |
| online version: https://learn.microsoft.com/powershell/module/Az.FrontDoor/new-azfrontdoorbackendpoolssettingobject |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.