az functionapp create
sorting should account for EOL date
#28224
Labels
Auto-Assign
Auto assign by bot
azf_bug
azf_reviewed
Functions
az functionapp
Service Attention
This issue is responsible by Azure service team.
Related command
az functionapp create --functions-version 4 --runtime <runtime>
(without also setting--runtime-version
)Is your feature request related to a problem? Please describe.
The current version resolution logic only looks for the default property:
azure-cli/src/azure-cli/azure/cli/command_modules/appservice/custom.py
Line 3613 in a6e9bac
Dotnet is an example of a stack that has two values for the runtime setting, but only one of those can have the default property. In the absence of the default flag being present, the order from the Stacks API seems to be used. I'm not sure if that
sort
method would have any other side effects.This has had the effect of making the default for the
dotnet-isolated
runtime .NET Framework 4.8, which has never been the desired default for that runtime. But it also creates the possible trap where the CLI could start defaulting to things that are nearing EOL when a better supported option is present for any given stack. This issue requests changes to protect against those situations.Describe the solution you'd like
The sorting should account for the
endOfLifeDate
property in the Stacks API and choose sort based on the date, prioritizing the furthest away. Absence of theendOfLifeDate
property (as for .NET Framework 4.8 or if someone should forget to note it for a given stack) should be treated as a minimum date and appear last in sorting.Describe alternatives you've considered
We will also ensure the Stacks API itself is properly sorted for .NET, but ideally we have the combination of these. The .NET entries have been updated to put the default in place for dotnet-isolated, specifically,
Additional context
It would be worth confirming that this behavior would work for the other stacks as well.
The text was updated successfully, but these errors were encountered: