Skip to content

Can't force start a resource for a second time #14812

@afscrome

Description

@afscrome

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When you first start your app host, aspire lets you Start a resource that is waiting to force it to start, even if it is waiting for dependencies.

If however you stop and then start the resource again, the force start options disappears.

Expected Behavior

I should be able to force start resources on subsequent runs.

Steps To Reproduce

  1. Start the below app host. Notice that the blockee resource is in the Waiting state
  2. Start the blockee resource - it force starts as expected
  3. Wait for the blockee resource to complete
  4. Start the blockee resource again, it now transitions into the Waiting state

I'd expect to be able to press Start again to force start blockee a second time, but the option is greyed out so I can't.

var blocker = builder.AddExecutable("blocker", "pwsh", ".")
    .WithExplicitStart();
var blockee = builder.AddExecutable("blockee", "pwsh", ".")
    .WaitFor(blocker);

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions