microsoft/vscode-azurestaticwebapps

Deploy from monorepo fails

core-dev-out opened this issue · 3 comments

  1. Forked sample monorepo
  2. Opens in CodeSpaces using "Tutorial: Upload file to storage with SAS token" DevContainer (not main dev container)
  3. Configured and ran full-stack sample successfully in code space (with public 7071 port and env vars for storage and fn api)
  4. Using SWA extension, create SWA in eastus2.
  5. Notification error - not much info there

image

  1. Check output for extension - still not a lot of info

image

  1. Check fork for workflow file - workflow file was created - yeah!

image

  1. SWA settings look good

image

How can I figure out why it thinks it failed? It looks like it worked to me?

@core-dev-out, in our repro, we're opening VS Code at the repo root in a repo that has multiple projects with host.json files. if you try to create a SWA for a downlevel project (not the first host.jon project), we think you'll get the results that we got, which is that the API path for the downlevel project SWA is the first project in the repo with a host.json file.

Maybe this is clearer: Repo has projects A and B, both with Azure functions and host.json files. Try to create a SWA for project B using the custom option in the wizard. In the YML worfklow file that gets generated, the API path is for project A.

A couple of issues are mine: location of api needed a / - this was a UI issue as the prompts cycled quickly - maybe due to codespaces. The other issue is that the build container needs to be node 18. I'll investigate how to set that.