You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WithLifetime(ContainerLifetime.Persistent) is supposed to keep a container running even if you stop and restart Aspire. This isn't working properly in combination with WithExplicitStart() as this feature prevents Aspire from reflecting the proper state of the containers during startup and thus negates some of the benefit of persistent lifetimes.
For instance, dependent services don't start until a running container is explicitly started again.
Expected Behavior
I expect a container to require an initial explicit start due to WithExplicitStart() but then remain running and be available even if I restart Aspire due to WithLifetime(ContainerLifetime.Persistent).
Steps To Reproduce
Use .WithLifetime(ContainerLifetime.Persistent).WithExplicitStart()
Start Aspire
Start the container
Restart Aspire
The container is now shown as stopped even though it should be running
Exceptions (if any)
No response
.NET Version info
.NET SDK:
Version: 9.0.201
Commit: 071aaccdc2
Workload version: 9.0.200-manifests.a3a1a094
MSBuild version: 17.13.13+1c2026462
Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.201\
I'm using Aspire 9.1.
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Here's what I was trying to do, I wanted to be able to start Redis Insight on demand but then keep it running until no longer needed. But as soon as I restart Aspire I can no longer access Redis via Redis Insight and the Aspire UI is showing Redis Insight as stopped even though the container is actually still running.
Also, if I use .WithExplicitStart() on Redis itself then services that .WaitFor(redis) don't start after a restart of Aspire until I explicitly start Redis again even though it is actually already running.
Is there an existing issue for this?
Describe the bug
WithLifetime(ContainerLifetime.Persistent)
is supposed to keep a container running even if you stop and restart Aspire. This isn't working properly in combination withWithExplicitStart()
as this feature prevents Aspire from reflecting the proper state of the containers during startup and thus negates some of the benefit of persistent lifetimes.For instance, dependent services don't start until a running container is explicitly started again.
Expected Behavior
I expect a container to require an initial explicit start due to
WithExplicitStart()
but then remain running and be available even if I restart Aspire due toWithLifetime(ContainerLifetime.Persistent)
.Steps To Reproduce
.WithLifetime(ContainerLifetime.Persistent).WithExplicitStart()
Exceptions (if any)
No response
.NET Version info
I'm using Aspire 9.1.
Anything else?
No response
The text was updated successfully, but these errors were encountered: