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] Angular 17 deployment to SWA breaks after upgrade because output path default changes and requires manual reconfig #3414

Open anfibiacreativa opened 7 months ago

anfibiacreativa commented 7 months ago

Output from azd version Run azd version and copy and paste the output here: azd version 1.6.1 (commit eba2c978b5443fdb002c95add4011d9e63c2e76f)

Describe the bug For an existing and previously deployed Angular app.

ERROR: failed deploying service 'webapp': failing invoking action 'deploy', failed verifying static web app deployment. Still in WaitingForDeployment state

To Reproduce Upgrade angular from v.16 to v.17, until the app is functional. The framework is now outputting distro to dist/browser/[app-name] when currently it was generating the distro to dist/[app-name]. Consequently, azd does not find the distribution files to deploy to Azure Static Web Apps.

Expected behavior The tool should iterate the dist folder, regardless of the levels of depth in output path, to detect required files instead of requiring manual reconfiguration in .azure.yml as seen here https://github.com/Azure-Samples/azure-search-openai-javascript/blob/feat/add-angular-shell-v1/azure.yaml#L10, to prevent deployment breaks due to structural changes in an upgrade.

Environment Information on your environment:

rajeshkamal5050 commented 7 months ago

Good to know that you have a workaround by overriding the dist: property https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/azd-schema#services-properties