Migrate Az.Functions from AutoRest PowerShell v3 to v4#29321
Migrate Az.Functions from AutoRest PowerShell v3 to v4#29321Francisco-Gamino wants to merge 11 commits intoAzure:mainfrom
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This pull request migrates the Az.Functions module from AutoRest PowerShell v3 to v4, updating generated/custom cmdlets, help/docs, and test assets to align with the new model/types and revised identity parameter behavior.
Changes:
- Migrates cmdlets/models to AutoRest PowerShell v4 (type namespace changes, new partial model support classes).
- Updates
New-AzFunctionApp/Update-AzFunctionAppidentity parameters and adds SKU guards inUpdate-AzFunctionApp. - Refreshes help/docs/examples, test scripts, and stack definitions (
functionAppStacks.json) with new runtimes/SKU metadata.
Reviewed changes
Copilot reviewed 65 out of 75 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Functions/Functions/help/Update-AzFunctionAppSetting.md | Help text updates for v4 model types and parameter descriptions. |
| src/Functions/Functions/help/Update-AzFunctionAppPlan.md | Help text updates for v4 model types and parameter descriptions. |
| src/Functions/Functions/help/Update-AzFunctionApp.md | Updates help to reflect new identity parameters and v4 model types. |
| src/Functions/Functions/help/Stop-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Start-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Restart-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionAppSetting.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionAppPlan.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Remove-AzFunctionApp.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/New-AzFunctionAppPlan.md | Updates help with DefaultProfile description and v4 output type. |
| src/Functions/Functions/help/New-AzFunctionApp.md | Updates help for new identity parameters and v4 model types. |
| src/Functions/Functions/help/Get-AzFunctionAppSetting.md | Updates help descriptions and v4 model types. |
| src/Functions/Functions/help/Get-AzFunctionAppPlan.md | Updates help output type to v4 model type. |
| src/Functions/Functions/help/Get-AzFunctionAppAvailableLocation.md | Updates help output type to v4 model type. |
| src/Functions/Functions/help/Get-AzFunctionApp.md | Updates help output type to v4 model type. |
| src/Functions/Functions/Properties/AssemblyInfo.cs | Updates Functions assembly version metadata. |
| src/Functions/Functions/ChangeLog.md | Updates Upcoming Release notes to describe v3→v4 migration and breaking changes. |
| src/Functions/Functions/Az.Functions.psd1 | Updates module manifest metadata/version and release notes content. |
| src/Functions/Functions.sln | Updates solution project GUID reference for regenerated project. |
| src/Functions/Functions.Autorest/test/utils.ps1 | Expands test environment setup, including Flex Consumption guard test setup. |
| src/Functions/Functions.Autorest/test/env.json | Refreshes recorded test environment values and adds new fields for new tests. |
| src/Functions/Functions.Autorest/test/New-Update-Remove-AzFunctionApp.Tests.ps1 | Updates tests for new identity parameters and adds new identity/guard scenarios. |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.Tests.ps1 | Updates tests for new identity parameters and adds combined identity coverage. |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.FlexConsumption.Tests.ps1 | Updates Flex tests to new identity parameters. |
| src/Functions/Functions.Autorest/generate-info.json | Updates generation identifier for v4 regeneration. |
| src/Functions/Functions.Autorest/examples/Update-AzFunctionApp.md | Updates examples to new identity parameter usage. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Update-AzFunctionApp.md | Updates docs for new identity parameters and v4 model types. |
| src/Functions/Functions.Autorest/docs/Stop-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Start-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Restart-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Remove-AzFunctionApp.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/New-AzFunctionAppPlan.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/New-AzFunctionApp.md | Updates docs for new identity parameters and v4 model types. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppSetting.md | Updates docs parameter descriptions and v4 model types. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppPlan.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppAvailableLocation.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionApp.md | Updates docs output type to v4 model type. |
| src/Functions/Functions.Autorest/docs/Az.Functions.md | Updates module GUID metadata in docs. |
| src/Functions/Functions.Autorest/custom/api/Support/Site.cs | Adds v4 partial model support for custom properties on Site. |
| src/Functions/Functions.Autorest/custom/api/Support/AppServicePlan.cs | Adds v4 partial model support for custom properties on AppServicePlan. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionAppPlan.ps1 | Updates v4 model types and plan construction type. |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionApp.ps1 | Implements new identity parameters, SKU guards, and v4 model usage. |
| src/Functions/Functions.Autorest/custom/Stop-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Start-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Restart-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionAppPlan.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/Remove-AzFunctionApp.ps1 | Updates parameter metadata for v4 model input. |
| src/Functions/Functions.Autorest/custom/New-AzFunctionAppPlan.ps1 | Updates v4 model types and plan construction type. |
| src/Functions/Functions.Autorest/custom/New-AzFunctionApp.ps1 | Implements new identity parameters and v4 model usage. |
| src/Functions/Functions.Autorest/custom/HelperFunctions.ps1 | Updates model type instantiations, endpoint suffix logic, and name availability call. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppSetting.ps1 | Updates output type and parameter metadata for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppPlan.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionAppAvailableLocation.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/Get-AzFunctionApp.ps1 | Updates output type for v4 models. |
| src/Functions/Functions.Autorest/custom/FunctionsStack/functionAppStacks.json | Refreshes stack definitions (Node 24, Python 3.14, Java 25) and FC1 SKU metadata. |
| src/Functions/Functions.Autorest/custom/Functions.types.ps1xml | Updates type names to v4 model namespaces for formatting/aliases. |
| src/Functions/Functions.Autorest/custom/Functions.format.ps1xml | Updates format view type names to v4 model namespaces. |
| src/Functions/Functions.Autorest/README.md | Switches AutoRest PowerShell extension to 4.x and updates directives. |
| src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs | Updates AutoRest assembly version metadata. |
Comments suppressed due to low confidence (1)
src/Functions/Functions/ChangeLog.md:33
- The changelog jumps from
## Upcoming Releasedirectly to## Version 4.3.0, and no longer includes a## Version 4.3.1section. If 4.3.1 was previously released, removing that entry rewrites release history and also conflicts with the prior 4.3.1 module version.
src/Functions/Functions.Autorest/custom/Update-AzFunctionApp.ps1
Outdated
Show resolved
Hide resolved
d3ce2b5 to
b727b8e
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
b727b8e to
793a58c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:33
- There are multiple trailing blank lines added at the end of the file. Please remove the extra empty lines to keep the generated file clean and minimize noisy diffs.
src/Functions/Functions.Autorest/custom/Update-AzFunctionApp.ps1
Outdated
Show resolved
Hide resolved
| # Please note that these tests can run in Playback mode only when executed locally. They fail in the pipeline due to the environment. | ||
| # However, they can be used for local deployment in Playback mode. | ||
| # Describe 'New-AzFunctionApp - Flex Consumption' { | ||
| Describe 'New-AzFunctionApp - Flex Consumption' -Tag 'LiveOnly' { | ||
| Describe 'New-AzFunctionApp - Flex Consumption' { |
There was a problem hiding this comment.
The file comment says these Flex Consumption tests "fail in the pipeline" and were previously gated by -Tag 'LiveOnly', but the Describe block no longer has that tag. Either update the comment (if pipeline support was fixed) or restore appropriate tagging/conditional skipping so CI doesn’t start running tests that are known to be environment-dependent.
There was a problem hiding this comment.
I am testing a fix for these tests. If the fix does not work, I will disable them so that CI can pass.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:35
- This file now ends with a large block of trailing blank lines. Please remove the extra empty lines to keep the generated assembly metadata clean and reduce diff noise in future regenerations.
src/Functions/Functions.Autorest/test/New-AzFunctionApp.Tests.ps1
Outdated
Show resolved
Hide resolved
src/Functions/Functions.Autorest/examples/Update-AzFunctionApp.md
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
3965c10 to
fdcdf80
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 64 out of 75 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Functions/Functions.Autorest/Properties/AssemblyInfo.cs:38
- There are multiple trailing blank lines added at the end of this file. Please remove the extra empty lines to keep generated assembly metadata files clean and minimize unnecessary diffs.
src/Functions/Functions.Autorest/custom/Update-AzFunctionApp.ps1
Outdated
Show resolved
Hide resolved
| Write-Verbose "Validate that the expected expetedErrorId is thrown" -Verbose | ||
| $scriptblock | Should -Throw -ErrorId $expectedErrorId |
There was a problem hiding this comment.
Typo in log message: "expetedErrorId" should be "expectedErrorId".
fdcdf80 to
594e1e2
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Breaking changes: - Replaced -IdentityType parameter with -EnableSystemAssignedIdentity (Boolean/SwitchParameter) in New-AzFunctionApp and Update-AzFunctionApp - Replaced -IdentityID parameter with -UserAssignedIdentity (String array of ARM resource IDs) in New-AzFunctionApp and Update-AzFunctionApp - New-AzFunctionApp and Update-AzFunctionApp now support combining SystemAssigned and UserAssigned identities in a single call - Output type property changes: enum types converted to strings, arrays converted to Lists (see BreakingChangeIssues.csv) Bug fixes: - Fix parameter set conflict between Create and CreateExpanded when passing identity params to internal cmdlet - Fix AppSetting list type (List[Object] to List[INameValuePair]) - Fix error messages to reference new parameter names - Fix variable typo (siteCofig to siteConfig) - Add SKU validation guards for Flex Consumption and Container App plans Tests: - Added combined SystemAssigned+UserAssigned identity tests for New-AzFunctionApp and Update-AzFunctionApp - Added Update-AzFunctionApp error guard test for Flex Consumption apps - Updated test assertions for new parameter names and ErrorIds - Removed 9 auto-generated template test stubs - All 64 tests pass in both record and playback modes Other: - Updated functionAppStacks.json (adds Node.js 24, Python 3.14, Java 25) - Added HelpMessage attributes for InputObject, DefaultProfile, and ResourceGroupName across all custom cmdlets - Added comment on StorageAccounts_Update remove-operation directive
- Fix identity parameter detection in Update-AzFunctionApp to use PSBoundParameters.ContainsKey instead of truthiness check, correctly handling -UserAssignedIdentity @() empty array case - Remove duplicate -Name parameter in ValidateFunctionAppNameAvailability to prevent runtime binding error (Name already in PSBoundParameters) - Add [Parameter(DontShow)] and [SwitchParameter] type to param in New-AzFunctionApp to hide it from public help - Update help example to use -EnableSystemAssignedIdentity:False instead of 0 for Boolean parameter clarity - Restore module/assembly versions to 4.3.1 to match upstream/main - Remove obsolete custom/Api20231201/ files (superseded by custom/api/Support/)
…igration - Fix stale v3 namespace reference: Models.Api20190401.BlobContainer to Models.BlobContainer in New-AzFunctionApp WhatIf path - Re-record all test recordings against live Azure (78 passed, 0 failed) - Sanitize recordings (secrets replaced with placeholders) - All tests validated in Live mode (98 passed, 0 failed, 18 skipped) including LiveOnly-tagged ACA and Flex Consumption tests
…ex test comment - Fix typo in Update-AzFunctionApp.ps1 comment: 'intenal' -> 'internal', 'process' -> 'processed' - Expand acronyms in ChangeLog.md per Azure PS guidelines: ARM (Azure Resource Manager), SKU (stock keeping unit) - Clarify parameter types in ChangeLog: SwitchParameter for New-*, Boolean for Update-* - Update Flex Consumption test comment: removed outdated 'fail in pipeline' note since tests now work in all modes including CI playback
…y v4 migration - Replace hardcoded GetEndpointSuffix switch with dynamic StorageEndpointSuffix from Azure context (originally merged as Azure#29035) - The v4 migration regenerated from pre-Azure#29035 code, inadvertently reverting the cloud portability fix [Azure#29034]
- Add null check for Get-AzContext and context.Environment before accessing StorageEndpointSuffix, preventing null reference exceptions when no Azure session is active
- Handle combined 'SystemAssigned,UserAssigned' identity type in fallback logic using -match instead of exact string comparison - Fix help example: use -EnableSystemAssignedIdentity \True instead of 1 - Update test assertion for combined identity to use -Match pattern - Add ChangeLog entry for combined identity fallback fix
- Restore [PreviewMessage()] BC announcement attributes to all 14 custom cmdlet files. These were lost when the v4 migration commit overwrote the files with regenerated code from pre-Azure#29139 base. - Attributes announce breaking changes in Az v16.0.0 (May 2026) per the BC announcement PR Azure#29139
- Re-recorded all test recordings after adding PreviewMessage BC attributes, combined identity fallback fix, help example fix, cloud portability fix, and null-safety fix - Live tests: 98 passed, 0 failed, 18 skipped - Record tests: 78 passed, 0 failed, 18 skipped - Recordings sanitized (secrets replaced with placeholders)
…y and fix typo - Change [ValidateNotNullOrEmpty()] to [ValidateNotNull()] on -UserAssignedIdentity parameter in Update-AzFunctionApp so empty array @() triggers custom UserAssignedIdentityRequired error instead of generic parameter binding error - Fix typo in test: 'expetedErrorId' -> 'expectedErrorId'
594e1e2 to
e93ad8f
Compare
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
This PR migrates the Az.Functions module from AutoRest PowerShell v3 to v4, replacing #29111 with additional bug fixes, updated test recordings, and refreshed function app stacks.
Breaking Changes
Identity Parameter Changes
-IdentityType->-EnableSystemAssignedIdentity: SwitchParameter inNew-AzFunctionApp, Boolean inUpdate-AzFunctionApp-IdentityID->-UserAssignedIdentity: Renamed. Accepts sameString[]of user-assigned identity resource IDsOutput Type Changes
IdentityType) now returnSystem.Stringinstead of enum objectsIdentityUserAssignedIdentity) now returnList<T>instead of arrays$app.IdentityUserAssignedIdentity.AdditionalPropertiesBug Fixes
Update-AzFunctionAppto handle"SystemAssigned,UserAssigned"stringStorageEndpointSuffixwith null-safety)Models.Api20190401.BlobContainerinNew-AzFunctionAppWhatIf pathUpdate-AzFunctionAppfor Flex Consumption and Container App plansBreaking Change Announcement
[PreviewMessage()]attributes and README directives from [BC] Functions Breaking Change Announcement #29139Test & Stack Updates
functionAppStacks.jsonwith Node 24, Python 3.14, Java 25Mandatory 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.