dotnet / aspire-samples

MIT License
652 stars 188 forks source link

[WebToolsE2E][Aspire] Running the AspireShop solution fails with error: "Failed to apply configuration value 'POSTGRES_PASSWORD'. A dependency may have failed to start." #168

Closed v-sherryfan closed 6 months ago

v-sherryfan commented 6 months ago

REGRESSION INFO: Worked on Aspire 8.0.0-preview.4.24156.9

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.10 Preview 3 [ Includes Aspire 8.0.0-preview.5.24178.3 and SDK 8.0.300-preview.24170.4 ]
  3. Install latest Aspire 8.0 P5 [8.0.0-preview.5.24179.3]
  4. Apply NuGet dotnet-tools Feed
  5. Install Docker Desktop for Windows

REPRO STEPS

  1. Clone aspire-samples repo
  2. Checkout the preview.5 branch
  3. Update sdk version to 8.0.300-preview.24170.4 in global.json
  4. Open samples\AspireShop.sln
  5. Build
  6. F5 / Ctrl+F5 with https

ACTUAL

EXPECTED

The dashboard page displays normally without any exceptions when running the AspireShop solution.

DamianEdwards commented 6 months ago

Samples require updating to support preview.5. See #172

DamianEdwards commented 6 months ago

This sample requires a parameter value to be set in user secrets so that the PostgreSQL database is created with a stable password. I'll update the readme to make this clear.

davidfowl commented 6 months ago

Or maybe make this optional.

DamianEdwards commented 6 months ago

How? I admit I'm still having trouble understanding how we expect this to work.

davidfowl commented 6 months ago

Make container persistence optional in aspire shop (or just remove it). Make another example showing off the container persistence.

DamianEdwards commented 6 months ago

Doesn't that just move the problem to another sample? I could add code that checks for a parameter value and if it's not there not use data volumes.

DamianEdwards commented 6 months ago

I ended up updating the samples with a ParameterDefault extension that saves the default generated value in user secrets so no action should be required by the user to run the sample. In PR #174

v-sherryfan commented 6 months ago

Unable to reproduce on 17.10 Preview 3 [Includes Aspire 8.0.0-preview.5.24201.12] using aspire-samples main branch.