microsoft / microsoft/aspire

[Dashboard] Resolve relative persistence directories from the AppHost

Open
#19,782 1 comment 0 reactions 0 assignees View on GitHub
area-dashboard area-hosting triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Hosting forwards a relative Dashboard data directory unchanged and launches the Dashboard with the managed bundle directory as its working directory. `DashboardRunStore` then resolves `Path.GetFullPath(dataRoot)` in that directory.

A path configured relative to the AppHost can therefore land under the installed or extracted Dashboard bundle, or fail when that location is read-only.

### Expected Behavior

A relative data directory should resolve from a documented AppHost/project context, or persistent data directories should be required to be absolute.

### Steps To Reproduce

1. Configure an AppHost Dashboard data directory with a relative path such as `./dashboard-data`.
2. Start the AppHost using the bundled Dashboard.
3. Inspect the resolved Dashboard database path.
4. It is relative to the Dashboard binary's working directory rather than the AppHost.

### Exceptions (if any)

The startup can fail when the resolved bundle location is read-only.

### Aspire doctor output

```plain
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200 and Ubuntu 24.04.3
```

### Anything else?

Related to #18924. Source: `src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs:284-326,615-623` and `src/Aspire.Dashboard/ServiceClient/DashboardRunStore.cs:538-545`. Previously raised during PR review and still present on current `main`.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the path handling in src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs:284-326,615-623 and src/Aspire.Dashboard/ServiceClient/DashboardRunStore.cs:538-545. Reproduce the relative ./dashboard-data case with a bundled Dashboard, then verify that the resolved path follows the documented AppHost/project context or that relative persistent directories are rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.