Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
412 stars 201 forks source link

Server error when Azure Dev Deploy finished #865

Closed v-jiaodi closed 2 years ago

v-jiaodi commented 2 years ago

Describe the issue: Server error when Azure Dev Deploy finished.

Repro Steps: Run command: bash ./test-templates.sh -c false -t <template_name> -b pr/551.

Error Message:

image

Through investigation, we found that it was caused by API service exception

image

image

Environment: OS: Windows desktop, Linux Desktop, WSL ,Mac ,Codesapce and DevContainer. Templates: https://github.com/Azure-Samples/todo-nodejs-mongo-swa-func https://github.com/Azure-Samples/todo-python-mongo-swa-func Branch: pr/551

Expected behavior: The api server is normal, and e2e test is pass.

@jongio for notification.

rajeshkamal5050 commented 2 years ago

@jongio @madebygps did we make any changes to other templates as part of #551? any changes in your PR could cause this?

jongio commented 2 years ago

Yes, I will investigate.

v-xuto commented 2 years ago

@jongio We do the manual test about template (todo-python-mongo), also encountered the same error when Azure Dev Deploy finished. It is a probabilistic error.

Error: image

Environment: OS: Windows desktop Templates: https://github.com/Azure-Samples/todo-python-mongo Branch: pr/892 Azd version: azd version 0.3.0-beta.3-daily.1921004 (commit e52ea013fede3560b90f4cf9d0a8e6d6ceac376a)

jongio commented 2 years ago

Please try again with main. If it fails, please leave it in failed state and provide me and @weikanglim with a link to the env.

zedy-wj commented 2 years ago

@jongio - We have tried again with main, it is still unstable. When we execute the command bash ./test-templates.sh -c false -t todo-python-mongo -l eastus2, the playwright test failed. At this point, when we click the api site, it reported Application Error. After a period of time, the api service can be deployed successfully, and the error will not occur again when playwright test is executed again.

In summary, the error was caused by the api service is not deployed successfully yet, the playwright test is run first.

jongio commented 2 years ago

Can you try with a different region and see if you get the same error?

zedy-wj commented 2 years ago

@jongio - We have tried with region East US, and get the same error. This time it was due to a failed deployment, you can reach from this link. Template: https://github.com/Azure-Samples/todo-python-mongo Branch: main azd version: 0.3.0-beta.3-daily.1937328 (commit d18003a6799b545e4050544f9fa05f1eaedb0948)

weikanglim commented 2 years ago

The detector was extremely helpful. I found the following errors related to the docker container crashing:

File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2022-10-24T03:24:54.032196245Z ModuleNotFoundError:
No module named 'uvicorn'2022-10-24T03:24:54.032199945Z ]
jongio commented 2 years ago

What do you mean by the detector?

jongio commented 2 years ago

Could be related: https://github.com/Azure/azure-dev/issues/932

rajeshkamal5050 commented 2 years ago

Not seeing these template failures in the pipelines. Might be a temporary region issue. Reopen if you see again.

zedy-wj commented 2 years ago

@rajeshkamal5050, @jongio - In today's test, the issue persists and occurs at a high rate.

OS: Windows desktop. azd version: azd version 0.3.0-beta.6-pr.1947898 (commit a7b9ee6038c4ecbe8ddda4c0ba1acbd2ec208fc8) branch: pr/996 templates: https://github.com/azure-samples/todo-python-mongo https://github.com/azure-samples/todo-csharp-cosmos-sql https://github.com/Azure-Samples/todo-csharp-sql https://github.com/Azure-Samples/todo-java-mongo https://github.com/azure-samples/todo-nodejs-mongo

The latest error: image

jongio commented 2 years ago

Fixed with #996