Skip to content
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

az functionapp create sorting should account for EOL date #28224

Open
mattchenderson opened this issue Jan 19, 2024 · 2 comments · May be fixed by #30636
Open

az functionapp create sorting should account for EOL date #28224

mattchenderson opened this issue Jan 19, 2024 · 2 comments · May be fixed by #30636
Assignees
Labels
Auto-Assign Auto assign by bot azf_bug azf_reviewed Functions az functionapp Service Attention This issue is responsible by Azure service team.

Comments

@mattchenderson
Copy link

mattchenderson commented Jan 19, 2024

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:

runtimes.sort(key=lambda r: r.default, reverse=True) # make runtimes with default=True appear first

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 the endOfLifeDate 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.

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 19, 2024

Thank you for opening this issue, we will look into it.

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AnatoliB, @Francisco-Gamino, @shreyabatra4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot azf_bug azf_reviewed Functions az functionapp Service Attention This issue is responsible by Azure service team.
Projects
None yet
6 participants