You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
az functionapp config appsettings set emits misleading "Invalid version: 21 for runtime java" warning on Linux Java 21/25 apps
Describe the bug
When updating app settings on a Linux Java 21 (or Java 25) Function App on a Dedicated plan with a built-in Java image, every invocation of az functionapp config appsettings set prints a WARNING: Invalid version: 21 for runtime java and os linux. Supported versions for runtime java and os linux are: ['25.0', '21.0', '17.0', '11.0', '8.0']. Run 'az functionapp list-runtimes' for more details on supported runtimes.
The warning is cosmetic — the app settings update itself succeeds — but it is confusing to users and looks like a deployment-time error in CI logs.
The same kind of false positive can be reproduced on .NET-isolated apps when the Bicep/portal-stored runtime version is 8.0 (the Stacks API returns "8" for that runtime).
Related command
az functionapp config appsettings set
(emitted by check_language_runtime → _FunctionAppStackRuntimeHelper.resolve in appservice/custom.py)
Errors
PS C:\> az functionapp config appsettings set --name FA-demo-java-version --resource-group RG-demo-java-version --settings test_one=three
WARNING: Invalid version: 21 for runtime java and os linux. Supported versions for runtime java and os linux are: ['25.0', '21.0', '17.0', '11.0', '8.0']. Run 'az functionapp list-runtimes' for more details on supported runtimes.
[
...
]
Issue script & Debug output
Repro:
Create a Linux Java 21 Function App on a Dedicated plan via the Portal (no other changes).
Run az functionapp config appsettings set --name <app> --resource-group <rg> --settings test_one=three --debug.
Observe the warning above. The setting is still applied.
Tested with multiple az versions including the latest. The Portal stores the runtime as Java|21 (no .0 suffix); the Stacks API returns the version as '21.0'. The CLI's lookup table old_to_new_version in _FunctionAppStackRuntimeHelper.resolve does not have an entry for 21 (or 25), so the version is reported as invalid even though Java 21 is fully supported.
Expected behavior
No warning. az functionapp config appsettings set should treat Java|21 as a valid configuration for a supported, available runtime.
More generally, the version normalization should not require a code change to add an entry every time a new Java/.NET major version ships.
Environment Summary
azure-cli 2.85.0+ (also reproduces on previous releases)
core 2.85.0
(Reproduced internally on the latest GA and on at least one previous release.)
Additional context
Linux Java 21 Function App, Dedicated plan, built-in Java image.
The warning text matches the API-returned versions exactly ('25.0', '21.0', '17.0', '11.0', '8.0'), confirming the API itself returned correct data — the validation logic in the CLI is what's wrong.
Title
az functionapp config appsettings setemits misleading "Invalid version: 21 for runtime java" warning on Linux Java 21/25 appsDescribe the bug
When updating app settings on a Linux Java 21 (or Java 25) Function App on a Dedicated plan with a built-in Java image, every invocation of
az functionapp config appsettings setprints aWARNING: Invalid version: 21 for runtime java and os linux. Supported versions for runtime java and os linux are: ['25.0', '21.0', '17.0', '11.0', '8.0']. Run 'az functionapp list-runtimes' for more details on supported runtimes.The warning is cosmetic — the app settings update itself succeeds — but it is confusing to users and looks like a deployment-time error in CI logs.
The same kind of false positive can be reproduced on .NET-isolated apps when the Bicep/portal-stored runtime version is
8.0(the Stacks API returns"8"for that runtime).Related command
(emitted by
check_language_runtime→_FunctionAppStackRuntimeHelper.resolveinappservice/custom.py)Errors
Issue script & Debug output
Repro:
az functionapp config appsettings set --name <app> --resource-group <rg> --settings test_one=three --debug.Tested with multiple
azversions including the latest. The Portal stores the runtime asJava|21(no.0suffix); the Stacks API returns the version as'21.0'. The CLI's lookup tableold_to_new_versionin_FunctionAppStackRuntimeHelper.resolvedoes not have an entry for21(or25), so the version is reported as invalid even though Java 21 is fully supported.Expected behavior
No warning.
az functionapp config appsettings setshould treatJava|21as a valid configuration for a supported, available runtime.More generally, the version normalization should not require a code change to add an entry every time a new Java/.NET major version ships.
Environment Summary
(Reproduced internally on the latest GA and on at least one previous release.)
Additional context
'25.0', '21.0', '17.0', '11.0', '8.0'), confirming the API itself returned correct data — the validation logic in the CLI is what's wrong.az webapp list runtimes: Update logic to include missing Java versions and remove hardcoded lists #32461. That PR was scoped to_StackRuntimeHelper(az webapp list-runtimes); the Functions counterpart_FunctionAppStackRuntimeHelper.resolvestill uses a hardcoded version map.A fix is in progress; will link the PR once filed.