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
400 stars 192 forks source link

[Issue] Azure Functions deployment reports success, but function not deployed because Oryx build failed #3698

Open sinedied opened 5 months ago

sinedied commented 5 months ago

Output from azd version azd version 1.8.0 (commit 8246323c2472148288be4b3cbc3c424bd046b985)

Describe the bug When deploying a JavaScript Azure Function with AZD, the installation of dependencies and build of the app is done remotely with Oryx.

When deploying the Functions, AZD reports a successful deployment as the zip upload succeeds, but the Function app is not deployed if the Oryx build fails and there's no easy way to detect and debug that when it happens.

To Reproduce

  1. Git clone this repo: https://github.com/Azure-Samples/serverless-chat-langchainjs/
  2. cd packages/api && npm rm typescript => We remove the typescript tool from the Functions API, causing the build to fail
  3. azd deploy => Deployment success, but no Function app is actually deployed

Expected behavior AZD should not report a successful deployment if Oryx build fails, or at least provide a way to check if an issue occurred and show the actual error logs from the Oryx build.

Environment Information on your environment:

rajeshkamal5050 commented 5 months ago

@hemarina does your fix for #3260 also covers this one? cc @weikanglim

hemarina commented 5 months ago

@rajeshkamal5050 It won't work for function app because deployment status api currently only support Linux web apps.