microsoft / vscode-azureappservice

Azure App Service extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureappservice
MIT License
111 stars 94 forks source link

Ignore pattern stopped working well for python #2658

Open erikpa1 opened 3 months ago

erikpa1 commented 3 months ago

Hi, one day I started to have troubles, I though I'm crazy, but I'm NOT!

It looks like for python web app there is problem with ignore pattern for "pycache" there was a lot of time situation where on web app was wrong script. This is probably why,... it loaded from pychace... (probably).

Any way, ignore pattern is not working, it takes pycache to zip file.

image

nturinski commented 2 months ago

Hi @erikpa1

I wanted to ask, but is the zipfile ignore pattern working for all of your other glob patterns? Is it only the pycache one that is failing? If so, it would indicate to me that there is something going wrong due to special characters or duplicate entries.

erikpa1 commented 1 month ago

@nturinski no idea what you are asking, pycache{/**} stopped working in every project just one day, but itself,... I have no idea how I find if there is something wrong...

nturinski commented 1 month ago

In the settings.json that you provided, you have about 30 different folders that should be ignored by the zip file. I was asking if all of them are not working or if it's only the pycache one.

erikpa1 commented 1 month ago

@nturinski The ".git" and "env{,.**}" works, rest I don't use, settings.json is generated by plugin.

When I added .pyc, the app deploy was even smaller - if I remember right, it's long time I have written this bug. But what I know for sure I stopped to have problem with legacy code appearing on backend. After deploy I was unable to run app because there were error on lines event not existing in code.... (only logical idea is pycache...) Could be nice if plugin would keep .zip file which was sent to cloud to check it manually...

nturinski commented 1 month ago

We deploy the zip file via a zipstream so that it will never take up memory in your local drive, but we can definitely enable an option to save the zip file to disk first so that users can inspect the zip file in case of issues like this.

Sidenote, but there is also a method to deploy zip files directly instead of having the extension zipping it for you. {F98C0F74-6CF1-4ABA-8F22-415DBB59E2F4}

erikpa1 commented 1 month ago

@nturinski Lol nice thanks for hack, I'm definitely going to use this hack for some cases.