Is there an existing issue for this?
Related but not duplicate: #18548 covers a concurrent state-directory creation race. This issue is about an incompatible state-store schema after switching from a newer DCP to an older stable DCP.
Describe the bug
After using a newer/dogfood Aspire/DCP version, running an AppHost with stable Aspire 13.4.6 hangs at:
Connecting to AppHost...
Starting dashboard...
The dashboard never starts listening, and application resources remain in Starting or Waiting. aspire ps may show the AppHost with a null dashboard URL, while aspire describe/aspire wait cannot make progress.
The underlying DCP controller process exits immediately because the global state database was migrated by a newer DCP version:
failed to initialize state store: could not migrate state store database
'C:\Users\<user>\.dcp\state\state.sqlite3': could not apply state store migrations:
no migration found for version 2: read down for version 2 migrations: file does not exist
This error is not surfaced by aspire run. Instead, the CLI waits indefinitely at Starting dashboard....
Environment
- OS: Windows
- Aspire CLI:
13.4.6+87fe259e4fc244c599019a7b1304c85a1488f248 (stable)
- AppHost SDK:
13.4.6
- DCP bundled with stable Aspire:
0.24.3 (a2b84af5a533e915dfd805d4fe1e7f238abc143a)
- .NET SDK selected by the project:
10.0.302
- Docker Desktop:
29.6.1
The machine also uses newer/dogfood Aspire builds, which appears to be how the shared DCP database reached schema version 2.
Steps to reproduce
- Run an AppHost with a newer Aspire/DCP version that migrates
%USERPROFILE%\.dcp\state\state.sqlite3 to schema version 2.
- Switch to a project using stable Aspire/AppHost SDK 13.4.6 and DCP 0.24.3.
- Run:
aspire run --non-interactive
- Observe that startup hangs at:
To reveal the hidden cause, running the bundled controller against the generated kubeconfig reports:
dcp.exe run-controllers --kubeconfig <generated-kubeconfig> --monitor <apphost-pid> --container-runtime docker -v=debug
failed to initialize state store: could not migrate state store database
'C:\Users\<user>\.dcp\state\state.sqlite3': could not apply state store migrations:
no migration found for version 2: read down for version 2 migrations: file does not exist
DCP's API server is otherwise healthy. Resources are created in the API, but no controller reconciles them: the dashboard Executable has an empty execution ID/state/start timestamp and no process is launched.
Expected behavior
Aspire should handle switching between DCP versions safely. Possible acceptable behaviors include:
- isolate state stores by incompatible DCP/schema version;
- support the required downgrade migration;
- detect incompatible transient state and safely back it up/reset it; or
- fail immediately with the controller error and actionable recovery guidance.
At minimum, a required DCP controller startup failure must be propagated to the AppHost/CLI instead of leaving aspire run hanging at Starting dashboard....
Actual behavior
- The DCP controller exits with a state migration error.
- The failure is not shown by
aspire run.
- The dashboard remains
Starting with no listener.
- Dependent resources remain
Starting/Waiting.
- Startup never becomes usable.
Workaround
- Stop all AppHosts/DCP processes.
- Back up and remove the incompatible state files:
%USERPROFILE%\.dcp\state\state.sqlite3
%USERPROFILE%\.dcp\state\state.sqlite3.migrate.lock
- Run
aspire run again.
DCP creates a compatible state store, the dashboard starts immediately, migrations complete, and the application becomes healthy.
Suggested regression coverage
- Create a state database at a newer schema version, then start an older DCP that lacks the down migration.
- Verify Aspire fails fast and includes the DCP controller's migration error.
- Verify switching between supported stable/dogfood DCP versions cannot silently make all AppHosts unusable.
Is there an existing issue for this?
Related but not duplicate: #18548 covers a concurrent state-directory creation race. This issue is about an incompatible state-store schema after switching from a newer DCP to an older stable DCP.
Describe the bug
After using a newer/dogfood Aspire/DCP version, running an AppHost with stable Aspire 13.4.6 hangs at:
The dashboard never starts listening, and application resources remain in
StartingorWaiting.aspire psmay show the AppHost with a null dashboard URL, whileaspire describe/aspire waitcannot make progress.The underlying DCP controller process exits immediately because the global state database was migrated by a newer DCP version:
This error is not surfaced by
aspire run. Instead, the CLI waits indefinitely atStarting dashboard....Environment
13.4.6+87fe259e4fc244c599019a7b1304c85a1488f248(stable)13.4.60.24.3(a2b84af5a533e915dfd805d4fe1e7f238abc143a)10.0.30229.6.1The machine also uses newer/dogfood Aspire builds, which appears to be how the shared DCP database reached schema version 2.
Steps to reproduce
%USERPROFILE%\.dcp\state\state.sqlite3to schema version 2.To reveal the hidden cause, running the bundled controller against the generated kubeconfig reports:
DCP's API server is otherwise healthy. Resources are created in the API, but no controller reconciles them: the dashboard
Executablehas an empty execution ID/state/start timestamp and no process is launched.Expected behavior
Aspire should handle switching between DCP versions safely. Possible acceptable behaviors include:
At minimum, a required DCP controller startup failure must be propagated to the AppHost/CLI instead of leaving
aspire runhanging atStarting dashboard....Actual behavior
aspire run.Startingwith no listener.Starting/Waiting.Workaround
aspire runagain.DCP creates a compatible state store, the dashboard starts immediately, migrations complete, and the application becomes healthy.
Suggested regression coverage