-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Az.Functions] Add Flex Consumption support and upgrade to Autorest 4.x #28851
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?
[Az.Functions] Add Flex Consumption support and upgrade to Autorest 4.x #28851
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 updates the Azure Functions PowerShell module with significant enhancements for Flex Consumption support, runtime version updates, and test improvements.
Key Changes
- Adds Flex Consumption plan type support with new cmdlet
Get-AzFunctionAppFlexConsumptionRuntime - Updates default runtime versions across multiple runtimes (PowerShell 7.2→7.4, Node 18→22, DotNet 6→8, Python 3.10→3.12, Java 17→21)
- Refactors test suite with improved verbose logging, variable naming consistency, and enhanced test coverage for Flex Consumption scenarios
Reviewed Changes
Copilot reviewed 56 out of 66 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/helpers/Storage/readme.noprofile.md | AutoRest configuration updates for Storage helper module with new directives for BlobContainer cmdlets |
| src/helpers/AppInsights/readme.noprofile.md | Simplified AppInsights AutoRest configuration by removing redundant specification references |
| src/Functions/Functions/help/Get-AzFunctionAppFlexConsumptionRuntime.md | New help documentation for Flex Consumption runtime cmdlet (placeholder examples need completion) |
| src/Functions/Functions/help/Az.Functions.md | Module index updated to include new Flex Consumption cmdlet |
| src/Functions/Functions.Autorest/test/utils.ps1 | Test utility updates with new environment variables for Flex testing, updated runtime versions, and additional test resource names |
| src/Functions/Functions.Autorest/test/env.json | Test environment data refreshed with new resource names and updated configurations |
| src/Functions/Functions.Autorest/test/Update-AzFunctionAppSetting.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Update-AzFunctionAppPlan.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Update-AzFunctionApp.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Stop-AzFunctionApp.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Start-AzFunctionApp.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Restart-AzFunctionApp.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Remove-AzFunctionAppSetting.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Remove-AzFunctionAppPlan.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Remove-AzFunctionApp.Tests.ps1 | Enhanced test with improved variable naming, verbose logging, and updated runtime versions |
| src/Functions/Functions.Autorest/test/New-Update-Remove-AzFunctionAppPlan.Tests.ps1 | Improved test structure with BeforeAll block, enhanced logging, and consistent variable usage |
| src/Functions/Functions.Autorest/test/New-Update-Remove-AzFunctionApp.Tests.ps1 | Major refactoring with reordered tests, improved logging, and new test scenarios |
| src/Functions/Functions.Autorest/test/New-AzFunctionAppPlan.Recording.json | Updated test recording with new resource IDs and timestamps |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.Tests.ps1 | Comprehensive test updates with runtime version changes, improved error handling, and enhanced validation |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.FlexConsumptionTests.ps1 | New comprehensive test suite for Flex Consumption functionality with helper functions and multiple test scenarios |
| src/Functions/Functions.Autorest/test/New-AzFunctionApp.ACA.Tests.ps1 | Enhanced ACA tests with improved variable scoping and verbose logging |
| src/Functions/Functions.Autorest/test/Get-Update-Remove-AzFunctionAppSetting.Tests.ps1 | Improved test with BeforeAll block, better variable naming, and enhanced logging |
| src/Functions/Functions.Autorest/test/Get-AzFunctionAppSetting.Tests.ps1 | Removed empty test file |
| src/Functions/Functions.Autorest/test/Get-AzFunctionAppFlexConsumptionRuntime.Tests.ps1 | New comprehensive test suite for Flex Consumption runtime cmdlet with validation of supported runtimes and versions |
| src/Functions/Functions.Autorest/test/Get-AzFunctionAppAvailableLocation.Tests.ps1 | Extended tests to validate Flex Consumption location support and zone redundancy |
| src/Functions/Functions.Autorest/docs/Get-AzFunctionAppFlexConsumptionRuntime.md | New cmdlet documentation (placeholder examples need completion) |
| src/Functions/Functions.Autorest/docs/Az.Functions.md | Module documentation updated with new Flex Consumption cmdlet reference |
| src/Functions/Functions.Autorest/custom/api/Support/Site.cs | Namespace simplification for Site model |
| src/Functions/Functions.Autorest/custom/api/Support/AvailablePlanType.cs | Added FlexConsumption plan type to available options |
| src/Functions/Functions.Autorest/custom/api/Support/AppServicePlan.cs | Namespace simplification for AppServicePlan model |
| src/Functions/Functions.Autorest/custom/Update-AzFunctionAppSetting.ps1 | Updated type references to use simplified namespaces |
src/Functions/Functions/help/Get-AzFunctionAppFlexConsumptionRuntime.md
Outdated
Show resolved
Hide resolved
src/Functions/Functions.Autorest/docs/Get-AzFunctionAppFlexConsumptionRuntime.md
Outdated
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Adding Functions folks for FYI |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
The PR contains the following changes:
Upgraded Az.Functions to Autorest 4.x
Resolves [Functions] Upgrade module autorest.powershell v4 #24403
This upgrade introduces changes to internal types for models generated by Autorest, e.g., new models
Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.IGeoRegion instead of
Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20231201.IGeoRegion.
Updated Az.Functions helpers:
1) AppInsights helper (
src/helpers/AppInsights/readme.noprofile.md) updated to build from the main branch. Previously, it was building from https://github.com/Azure/azure-rest-api-specs/blob/e0d9ceb1ca85e76a31b8496201499a7312824c09, but I needed a version that returns the APPLICATIONINSIGHTS_CONNECTION_STRING.2) Storage helper (
src/helpers/Storage/readme.noprofile.md) updated to expose Blob container cmdlets, enabling creation, retrieval, and removal of blob containers. These are required to set deployment options for a Flex Consumption app.Added support for creating Flex Consumption function apps:
Resolves [Functions] Add support to create Flex Consumption function apps #24349
1) Updated
Get-AzFunctionAppAvailableLocationPlanTypeto includeFlexConsumption.- Added
ZoneRedundantto list locations where zone redundancy is supported (currently applies only to Flex Consumption).2) Added
Get-AzFunctionAppFlexConsumptionRuntime, a new cmdlet to retrieve Flex Consumption function app runtimes supported at a specified location.3) Added a new parameter set to
New-AzFunctionAppto support creating Flex Consumption function apps.- Added regression tests for Flex Consumption scenarios.
Cmdlet review for the new cmdlet and parameter set: https://github.com/Azure/azure-powershell-cmdlet-review-pr/issues/1524
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.