question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebApp:`az webapp up` by default resets the Python version to 3.7

See original GitHub issue

Describe the bug

When running az webapp up without the “runtime” flag, the Python version of my webapp is always reset to 3.7, although my Python app is running in Python 3.8. While az webapp up does store other default values from the first deployment in the config file, it does not do so with the runtime version.

Command Name az webapp up

To Reproduce:

  • Put any pre-requisite steps here…
  • az webapp up --runtime "PYTHON|3.8 --other-args"
  • az webapp up

Expected Behavior

Running az webapp up with a new flag should always store that setting as a standard in the config file. This should include the runtime, Python version etc.

Environment Summary

Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-debian-bullseye-sid
Python 3.6.10
Installer: DEB

azure-cli 2.18.0

Extensions:
db-up 0.2.0

Additional Context

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Kotasudhakarreddycommented, Feb 4, 2021

Looking in to it.

1reaction
Kotasudhakarreddycommented, Feb 15, 2021

Hey @Kotasudhakarreddy , thank you very much for your answer! This does explain why the command acts as it does. However, wenn az webapp up is used to redeploy, it does seem to update the existing app. After all:

  1. During the deployment it does say Updating runtime from Python 3.8 to Python 3.7
  2. Previously set environment variables on the webapp are kept and not deleted.
  3. In this tutorial in the MS Docs it literally says this:

    This command uses the parameters cached in the .azure/config file. Because App Service detects that the app already exists, it just redeploys the code.

Hi @larsschellhas - agreed on your points. Thanks for correcting me. Parameters cached under .azure/config will just store the info related to the azure configuration of your app like RG, SKU etc. Regarding -runtime as per the implementation if we don’t specify the -runtime by default it consider and set as python|3.7. we will look in to the feasibility of considering the runtime version from previous deployment and set as default if we don’t specify in the latest deployment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot set python 3.7 as webapp runtime stack in pipeline
I'm trying to create a webapp with runtime stack python 3.7. I can choose the wanted stack when creating it manually in azure...
Read more >
Configure Linux Python apps - Azure App Service
Show the current Python version with az webapp config show: ... <resource-group-name> --name <app-name> --linux-fx-version "PYTHON|3.7".
Read more >
Changes to Splunk Enterprise
The Python 3.7 interpreter is used by default in Splunk Enterprise version 9.x. There is no option to use Python 2.7 in Splunk...
Read more >
How to Install and Manage Multiple Python Versions in WSL2
It also replaced Command Prompt as the default system shell for Windows 10. Press “⊞ Windows”; Enter “PowerShell” into the search bar; Click...
Read more >
What's New In Python 3.7 — Python 3.11.1 documentation
New syntax features: PEP 563, postponed evaluation of type annotations. Backwards incompatible syntax changes: async ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found