dotnet / aspire-samples

MIT License
676 stars 197 forks source link

[WebToolsE2E][Aspire] After successfully deploying the Aspire-Samples/DatabaseContainers solution, going to /todos displays the error: "An error occurred while processing your request, status: 500." #143

Open v-sherryfan opened 8 months ago

v-sherryfan commented 8 months ago

REGRESSION INFO: Blocked by bug #2445 on Aspire 8.0.0-preview.3.24105.21

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.10 Preview 2 [ Includes Aspire 8.0.0-preview.4.24129.7 ]
  3. Apply NuGet dotnet-tools Feeds
  4. Install Docker Desktop for Windows
  5. Install azd [1.7.0-beta.1-daily]

REPRO STEPS

  1. Clone aspire-samples repo from main branch
  2. Checkout the preview.4 branch
  3. Open samples\DatabaseContainers.sln ( Bug 1985774 will be encountered after opening)
  4. Build solution
  5. Deploy using azd
    • Open the solution folder in a Command Prompt
    • Runing 'azd init', select 'Use code in the current directory' > Confirm and continue initializing my app, type a new environment name, press enter
    • Running 'azd up'
  6. Click on the deployed 'apiservice' endpoint, then go to /todos

ACTUAL: image image

Note:

  1. Do F5 then click on the endpoint of 'apiservice' and go to /todos occasionally reproduces this issue, but refreshing the page works fine.

EXPECTED image

DamianEdwards commented 7 months ago

This sample relies on bind mounts to initialize the database schemas. Bind mounts aren't translated to anything on ACA as part of deployment so those containers get created with no database on ACA which is why the apps don't work. There isn't a way to make this sample deployable via AZD today.