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

"Deploy to Web App“ command for the Python web app is broken #2581

Open
v-chenzha opened this issue Oct 10, 2023 · 3 comments
Open

"Deploy to Web App“ command for the Python web app is broken #2581

v-chenzha opened this issue Oct 10, 2023 · 3 comments
Labels
AT-CTI Created by CTI team

Comments

@v-chenzha
Copy link

v-chenzha commented Oct 10, 2023

OS: All
Build Version: 20231009.14
Regression: Not a regression

Repro Steps:

  1. Create a Python web app -> Deploy a project to it.
  2. Right click this web app and execute "SSH into Web App" command.
  3. Check whether succeeds to execute "SSH into Web App“ command for the Python web app.

Expect:
Succeed to execute "SSH into Web App“ for command the Python web app.

Actual:
Fail to execute "SSH into Web App“ command for the Python web app.
image

More Info:

  1. This issue also reproduces when executing "Start Remote Debugging" command for the Python web app.
  2. This issue doesn't reproduce when executing "SSH into Web App“ command for a not deployed the Python web app.
@v-chenzha v-chenzha added AT-CTI Created by CTI team regression and removed regression labels Oct 10, 2023
@nturinski
Copy link
Member

I was able to create a python web app, deploy to it (just a basic helloworld app), and then SSH into the Web App. Could you try this again and ensure that the app that you deployed didn't break the web app?

@v-chenzha
Copy link
Author

v-chenzha commented Oct 11, 2023

@nturinski This issue reproduces after deploying https://github.com/Azure-Samples/python-docs-hello-world or https://github.com/Azure-Samples/msdocs-python-flask-webapp-quickstart projects.
This issue reproduces for Python 3.8/3.9/3.10/3.11 web app.

@nturinski
Copy link
Member

I don't think SSH is the issue here. SSH seems to be working fine when the app is actually functional. Something seems to be wrong with deploy. No matter what I'm deploying, I'm always ending up with the same files:

image

But it's weird, because my output is this:

1:00:05 PM naturins-python-webapp2: Starting deployment...
1:00:06 PM naturins-python-webapp2: Creating zip package...
1:00:09 PM naturins-python-webapp2: Zip package size: 2.22 MB
1:00:13 PM naturins-python-webapp2: Fetching changes.
1:00:14 PM naturins-python-webapp2: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/c85ec17e-3f40-4535-935e-3380ff0f22da.zip (2.12 MB) to /tmp/zipdeploy/extracted
1:00:17 PM naturins-python-webapp2: Updating submodules.
1:00:18 PM naturins-python-webapp2: Preparing deployment for commit id '0b1b3feb-3'.
1:00:19 PM naturins-python-webapp2: PreDeployment: context.CleanOutputPath False
1:00:19 PM naturins-python-webapp2: PreDeployment: context.OutputPath /home/site/wwwroot
1:00:19 PM naturins-python-webapp2: Repository path is /tmp/zipdeploy/extracted
1:00:19 PM naturins-python-webapp2: Running oryx build...
1:00:19 PM naturins-python-webapp2: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.9 -p virtualenv_name=antenv --log-file /tmp/build-debug.log  -i /tmp/8dbca94b1c1877f --compress-destination-dir | tee /tmp/oryx-build.log
1:00:21 PM naturins-python-webapp2: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
1:00:21 PM naturins-python-webapp2: You can report issues at https://github.com/Microsoft/Oryx/issues
1:00:21 PM naturins-python-webapp2: Oryx Version: 0.2.20230508.1, Commit: 7fe2bf39b357dd68572b438a85ca50b5ecfb4592, ReleaseTagName: 20230508.1
1:00:21 PM naturins-python-webapp2: Build Operation ID: d26aa382ff52afeb
1:00:21 PM naturins-python-webapp2: Repository Commit : 0b1b3feb-3e59-463f-abce-33da8ff63040
1:00:21 PM naturins-python-webapp2: OS Type           : buster
1:00:21 PM naturins-python-webapp2: Image Type        : githubactions
1:00:21 PM naturins-python-webapp2: Detecting platforms...
1:00:23 PM naturins-python-webapp2: Detected following platforms:
1:00:23 PM naturins-python-webapp2:   python: 3.9.15
1:00:23 PM naturins-python-webapp2: Using intermediate directory '/tmp/8dbca94b1c1877f'.
1:00:23 PM naturins-python-webapp2: Copying files to the intermediate directory...
1:00:24 PM naturins-python-webapp2: Done in 1 sec(s).
1:00:24 PM naturins-python-webapp2: Source directory     : /tmp/8dbca94b1c1877f
1:00:24 PM naturins-python-webapp2: Destination directory: /home/site/wwwroot
1:00:24 PM naturins-python-webapp2: Python Version: /tmp/oryx/platforms/python/3.9.15/bin/python3.9
1:00:24 PM naturins-python-webapp2: Creating directory for command manifest file if it does not exist
1:00:24 PM naturins-python-webapp2: Removing existing manifest file
1:00:24 PM naturins-python-webapp2: Python Virtual Environment: antenv
1:00:24 PM naturins-python-webapp2: Creating virtual environment...
1:00:43 PM naturins-python-webapp2: Activating virtual environment...
1:00:43 PM naturins-python-webapp2: Running pip install...
1:00:51 PM naturins-python-webapp2: [20:00:45+0000] Collecting Flask==2.0.2
1:00:51 PM naturins-python-webapp2: [20:00:45+0000]   Downloading Flask-2.0.2-py3-none-any.whl (95 kB)
1:00:51 PM naturins-python-webapp2: [20:00:46+0000]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 95.2/95.2 KB 4.1 MB/s eta 0:00:00
1:00:51 PM naturins-python-webapp2: [20:00:46+0000] Collecting gunicorn
1:00:51 PM naturins-python-webapp2: [20:00:46+0000]   Downloading gunicorn-21.2.0-py3-none-any.whl (80 kB)
1:00:51 PM naturins-python-webapp2: [20:00:46+0000]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 80.2/80.2 KB 6.7 MB/s eta 0:00:00
1:00:51 PM naturins-python-webapp2: [20:00:46+0000] Collecting Jinja2>=3.0
1:00:51 PM naturins-python-webapp2: [20:00:46+0000]   Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
1:00:51 PM naturins-python-webapp2: [20:00:46+0000] Collecting Werkzeug>=2.0
1:00:51 PM naturins-python-webapp2: [20:00:46+0000]   Using cached werkzeug-3.0.0-py3-none-any.whl (226 kB)
1:00:51 PM naturins-python-webapp2: [20:00:47+0000] Collecting click>=7.1.2
1:00:52 PM naturins-python-webapp2: [20:00:47+0000]   Using cached click-8.1.7-py3-none-any.whl (97 kB)
1:00:52 PM naturins-python-webapp2: [20:00:47+0000] Collecting itsdangerous>=2.0
1:00:52 PM naturins-python-webapp2: [20:00:47+0000]   Using cached itsdangerous-2.1.2-py3-none-any.whl (15 kB)
1:00:52 PM naturins-python-webapp2: [20:00:47+0000] Collecting packaging
1:00:52 PM naturins-python-webapp2: [20:00:47+0000]   Downloading packaging-23.2-py3-none-any.whl (53 kB)
1:00:52 PM naturins-python-webapp2: [20:00:47+0000]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 KB 4.5 MB/s eta 0:00:00
1:00:52 PM naturins-python-webapp2: [20:00:48+0000] Collecting MarkupSafe>=2.0
1:00:52 PM naturins-python-webapp2: [20:00:48+0000]   Using cached MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
1:00:52 PM naturins-python-webapp2: [20:00:48+0000] Installing collected packages: packaging, MarkupSafe, itsdangerous, click, Werkzeug, Jinja2, gunicorn, Flask
1:00:52 PM naturins-python-webapp2: [20:00:50+0000] Successfully installed Flask-2.0.2 Jinja2-3.1.2 MarkupSafe-2.1.3 Werkzeug-3.0.0 click-8.1.7 gunicorn-21.2.0 itsdangerous-2.1.2 packaging-23.2
1:00:52 PM naturins-python-webapp2: WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available.
1:00:52 PM naturins-python-webapp2: You should consider upgrading via the '/tmp/8dbca94b1c1877f/antenv/bin/python -m pip install --upgrade pip' command.
1:00:52 PM naturins-python-webapp2: Not a vso image, so not writing build commands
1:00:52 PM naturins-python-webapp2: Preparing output...
1:00:52 PM naturins-python-webapp2: Copying files to destination directory '/tmp/_preCompressedDestinationDir'...
1:00:55 PM naturins-python-webapp2: Done in 3 sec(s).
1:00:55 PM naturins-python-webapp2: Compressing content of directory '/tmp/_preCompressedDestinationDir'...
1:00:59 PM naturins-python-webapp2: Copied the compressed output to '/home/site/wwwroot'
1:00:59 PM naturins-python-webapp2: Removing existing manifest file
1:00:59 PM naturins-python-webapp2: Creating a manifest file...
1:00:59 PM naturins-python-webapp2: Manifest file created.
1:00:59 PM naturins-python-webapp2: Copying .ostype to manifest output directory.
1:00:59 PM naturins-python-webapp2: Done in 36 sec(s).
1:01:00 PM naturins-python-webapp2: Running post deployment command(s)...
1:01:00 PM naturins-python-webapp2: Generating summary of Oryx build
1:01:00 PM naturins-python-webapp2: Parsing the build logs
1:01:00 PM naturins-python-webapp2: Found 0 issue(s)
1:01:00 PM naturins-python-webapp2: Build Summary :
1:01:00 PM naturins-python-webapp2: ===============
1:01:00 PM naturins-python-webapp2: Errors (0)
1:01:01 PM naturins-python-webapp2: Warnings (0)
1:01:01 PM naturins-python-webapp2: Triggering recycle (preview mode disabled).
1:01:01 PM naturins-python-webapp2: Deployment successful. deployer = ms-azuretools-vscode deploymentPath = ZipDeploy. Extract zip. Remote build.
1:01:09 PM: Deployment to "naturins-python-webapp2" completed.

Which seems to indicate the venv was created and pip install was run. I'm totally lost as to why this is happening, but I checked that this is not a regression as it's happening with the release version.

@nturinski nturinski changed the title Fail to execute "SSH into Web App“ command for the Python web app "Deploy into Web App“ command for the Python web app is broken Oct 11, 2023
@nturinski nturinski changed the title "Deploy into Web App“ command for the Python web app is broken "Deploy to Web App“ command for the Python web app is broken Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AT-CTI Created by CTI team
Projects
None yet
Development

No branches or pull requests

2 participants