vscode-azurefunctions
vscode-azurefunctions copied to clipboard
Add wait logic before initiating deployment to Python applications
Due to short/lack of sufficient wait time in the client, the necessary app settings are updated by VSCode before deployment but do not get enough time to propagate to all instances of the application.
VS Code updates deployment related app settings before deployment, but a lot of time the app settings are not propagated before the deployment leading to an inconsistent behavior.
For example: For python apps on Linux, Vs Code removes WEBSITE_RUN_FROM_PACKAGE app setting before deployment. If this setting is not propagated before deployment, then post deployment function app will show "no triggers found" when the setting is propagated.
Solution:
- Add a loop after updating app settings to make sure the settings are propagated like done by DevOps and GitHub action: https://github.com/Azure/functions-action/blob/d2580abdb32d42249f37bd6ec7a6fc7acd82bc30/src/publishers/zipDeploy.ts#L144-L179
- Add a wait time for at least 1 minute (might have to increase to 2 minutes).