azure-sdk-for-js icon indicating copy to clipboard operation
azure-sdk-for-js copied to clipboard

Runtime version variables come null. Have they been deprecated and replaced with linuxFxVersion and windowsFxVersion?

Open akumar-99 opened this issue 1 year ago • 8 comments

  • Package Name: @azure/arm-appservice
  • Package Version: 14.0.0
  • Operating system: Ubuntu 22.04.3 LTS
  • [x] nodejs
    • version: v16.20.1
  • [ ] browser
    • name/version:
  • [ ] typescript
    • version:
  • Is the bug related to documentation in
    • [ ] README.md
    • [x] source code documentation
    • [x] SDK API docs on https://docs.microsoft.com

Describe the bug

"netFrameworkVersion": null,
"phpVersion": null,
"pythonVersion": null,
"nodeVersion": null,
"powerShellVersion": null,
"linuxFxVersion": "PYTHON|3.10",
"windowsFxVersion": null,

I have a Web App running on Code - Python 3.10 runtime but when I see the value on UI JSON or fetch using CLI or JS SDK or REST API, pythonVersion comes as null whereas it should have been 3.10 but linuxFxVersion reports the right value which also matches with the list produced from CLI command az webapp list-runtimes.

To Reproduce Steps to reproduce the behavior:

  1. Create a Web App - Code and Configure your Stack Runtime.
  2. Visit the overview page and open JSON view.
  3. Check using az webapp CLI command.

Expected behavior According to stack configuration, appropriate runtime variable should return value instead of null.

Screenshots Web App Stack Runtime Configuration on Configuration PageWeb App Stack Runtime Configuration on Configuration Page
Web App Stack Runtime Configuration on Overview PageWeb App Stack Runtime Configuration on Overview Page
UI JSONUI JSON

Additional context Add any other context about the problem here.

akumar-99 avatar Aug 21 '23 08:08 akumar-99

If I understand correctly, CLI is parsing the value from runtime majorVersions or minorVersions. https://github.com/Azure/azure-cli/blob/56d778e6ff2f6032ea47eb63727fa1308a390d76/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L3166-L3173 https://github.com/Azure/azure-cli/blob/56d778e6ff2f6032ea47eb63727fa1308a390d76/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L3314-L3365 which is hard coded in Azure CLI.

qiaozha avatar Aug 22 '23 08:08 qiaozha

Hi @akumar-99. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar Aug 22 '23 08:08 github-actions[bot]

Something from my personal notes will help.

  • PHP

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
      • siteConfig.phpVersion and phpVersion from .getConfiguration() return the incorrect values (null and "") respectively
    • windows web app
      • UI shows support but the runtimes list az webapp list-runtimes does not show support
      • No related output in siteConfig.linuxFxVersion or linuxFxVersion from .getConfiguration() or siteConfig.phpVersion or phpVersion from .getConfiguration() image
  • Python

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
      • siteConfig.pythonVersion and pythonVersion from .getConfiguration() return the incorrect values (null and "") respectively
    • windows web app
      • UI shows support but the runtimes list az webapp list-runtimes does not show support
      • No related output in siteConfig.linuxFxVersion or linuxFxVersion from .getConfiguration() or siteConfig.pythonVersion or pythonVersion from .getConfiguration() image
  • Node

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
      • siteConfig.nodeVersion and nodeVersion from .getConfiguration() return the incorrect values (null and "")
    • windows web app
      • Using this we can set nodejs version - https://learn.microsoft.com/en-us/azure/app-service/configure-language-nodejs?pivots=platform-windows#set-nodejs-version
      • But the issue is we neither check if the app is using Node stack nor its version directly. We need to refer the settings variable which can be set for application irrespective of stack of web app.
  • Java

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
      • siteConfig.javaVersion and javaVersion from .getConfiguration() return the incorrect values (null and "")
    • windows web app
      • javaVersion and javaContainer and javaContainerVersion from .getConfiguration() gives me the right correct values
      • siteConfig.windowsFxVersion and windowsFxVersion from .getConfiguration() returns incorrect value
      • siteConfig.javaVersion and siteConfig.javaContainer and siteConfig.javaContainerVersion from .getConfiguration() return incorrect values
  • Go

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
    • windows web app
      • No support at all as expected
  • .NET (Also includes ASPNET for windows)

    • linux web app
      • siteConfig.linuxFxVersion and linuxFxVersion from .getConfiguration() returns the correct value
      • siteConfig.netFrameworkVersion and netFrameworkVersion from .getConfiguration() return the incorrect values ("v4.6" and "")
    • windows
      • siteConfig.netFrameworkVersion always returns "v4.6" irrespective of stack and versions configured
      • netFrameworkVersion from .getConfiguration() gives me the right value when .NET stack is configured but when a web app is configured with different stack, it still returns an arbitrary value.
      • Explained - https://github.com/Azure/azure-sdk-for-js/issues/26893
  • Ruby

    • UI has the value but I am not sure if it is still supported. List runtimes does not show RUBY nor does any API response returns RUBY related information
    • Only found in linux

akumar-99 avatar Aug 22 '23 08:08 akumar-99

@qiaozha So according to this then https://github.com/Azure/azure-cli/blob/56d778e6ff2f6032ea47eb63727fa1308a390d76/src/azure-cli/azure/cli/command_modules/appservice/custom.py#L3165 the null and "" values are by design?

Please elaborate further on major, minor versions parsing.

akumar-99 avatar Aug 22 '23 08:08 akumar-99

do you see any majorVersions or minorVersions informations when using client.provider.listWebAppStacks() apis ? I can not tell from your earlier screenshot.

qiaozha avatar Aug 22 '23 09:08 qiaozha

No, there are no fields related to majorVersions or minorVersions in the outputs. I have used appServiceClient.webApps.list() and appServiceClient.webApps.getConfiguration(resourceGroupName,webAppName) and neither has these two fields.

akumar-99 avatar Aug 22 '23 09:08 akumar-99

My issue might be the same, i have 2 app services, one runs on linux another one runs on windows . The properties.siteConfig.WindowsFxVersion --- for the app service which runs on windows OS returns null value , not sure what is wrong , but correctly populated for the app service which runs on linux OS

can someone send me insights on this , please

image

Cestmoileo avatar Mar 20 '24 19:03 Cestmoileo

@qiaozha can you send some insights on my issue, thx ..

Cestmoileo avatar Mar 21 '24 12:03 Cestmoileo