Skip to content

Defer explicit-start DCP registration - #17825

Merged
David Negstad (danegsta) merged 2 commits into
mainfrom
danegsta/fix-explicit-start-args
Jun 2, 2026
Merged

David Negstad (danegsta) merged 2 commits into
mainfrom
danegsta/fix-explicit-start-args

Conversation

@danegsta

Copy link
Copy Markdown
Member

Description

Session-scoped resources marked with WithExplicitStart() should not evaluate execution configuration callbacks during AppHost/dashboard startup. Those callbacks can prompt for user input or contribute arguments, environment variables, certificates, and other start-time configuration before the user has explicitly started the resource.

This change defers DCP registration for session-scoped explicit-start containers and executables until manual start. Persistent explicit-start resources are still registered immediately so DCP can evaluate the lifecycle key and discover existing instances, but manual start now patches the existing DCP resource to Spec.Start = true instead of deleting and recreating it, avoiding a second callback prompt.

User-facing usage

The Stress playground now includes prompt-based examples for validating this behavior:

builder.AddExecutable("manual-environment-interaction", "dotnet", Environment.CurrentDirectory, "run", "--project", stressEmptyProjectPath, "--no-build")
    .WithExplicitStart()
    .WithEnvironment(context => PromptForEnvironmentValueAsync(...));

builder.AddContainer("persistent-container-environment-interaction", interactionContainerImage)
    .WithContainerName("stress-persistent-container-environment-interaction")
    .WithEntrypoint("/bin/sh")
    .WithArgs("-c", "while true; do sleep 3600; done")
    .WithPersistentLifetime()
    .WithExplicitStart()
    .WithEnvironment(context => PromptForEnvironmentValueAsync(...));

Manual session-scoped resources should prompt only when manually started. Persistent resources prompt during startup because they must be registered with DCP immediately, and should not prompt again when manually started.

Validation:

dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-class "*.DcpExecutorTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
dotnet test --project tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj --no-launch-profile -- --filter-method "*.ExplicitStart_StartExecutable" --filter-method "*.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation" --filter-method "*.BeforeResourceStartedEvent_FiredWhenExplicitStartResourceIsManuallyStarted" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
dotnet build playground/Stress/Stress.AppHost/Stress.AppHost.csproj --no-restore

Fixes: #17813

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Avoid evaluating execution configuration callbacks for session-scoped explicit-start resources until they are manually started. Persistent explicit-start resources are still registered eagerly, but manual start now patches the existing DCP object instead of recreating it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 2, 2026 •

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 17825

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 17825"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Defers DCP object creation for session-scoped resources marked with WithExplicitStart() so that execution configuration callbacks (args/env, etc.) aren’t evaluated during AppHost/dashboard startup, while keeping persistent explicit-start resources created immediately and starting them via a Spec.Start=true patch to avoid re-running callbacks.

Changes:

  • Defer DCP registration/creation for explicit-start non-persistent containers/executables until manual start.
  • Start already-created explicit-start persistent resources by patching Spec.Start=true instead of delete/recreate.
  • Expand test coverage and add Stress playground interaction examples to validate callback deferral vs persistence behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Aspire.Hosting.Tests/Dcp/TestKubernetesService.cs Extends the test Kubernetes patch behavior to honor Spec.Start updates for executables/containers.
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs Updates and adds tests covering deferred creation for session-scoped explicit-start resources and non-reevaluation for persistent explicit-start start.
src/Aspire.Hosting/Dcp/ExecutableCreator.cs Uses the new utility to decide whether explicit-start executables should be created immediately or deferred.
src/Aspire.Hosting/Dcp/DcpModelUtilities.cs Adds ShouldDeferCreateForExplicitStart helper encapsulating the deferral decision logic.
src/Aspire.Hosting/Dcp/DcpExecutor.cs Adds a “patch start” path for already-created delayed-start resources and refactors patching into a helper method.
src/Aspire.Hosting/Dcp/ContainerCreator.cs Uses the new utility to decide whether explicit-start containers should be created immediately or deferred.
playground/Stress/Stress.AppHost/AppHost.cs Adds prompt-based Stress examples to validate callback deferral behavior for explicit-start session vs persistent resources.

@danegsta

Copy link
Copy Markdown
Member Author

PR Testing Report

PR Information

CLI Version Verification

  • Expected Commit: dd3261e
  • Installed Version: 13.5.0-pr.17825.gdd3261e0
  • Status: ✅ Verified - installed CLI version contains the PR commit short SHA (dd3261e0).

Changes Analyzed

Files Changed

  • playground/Stress/Stress.AppHost/AppHost.cs - Modified
  • src/Aspire.Hosting/Dcp/ContainerCreator.cs - Modified
  • src/Aspire.Hosting/Dcp/DcpExecutor.cs - Modified
  • src/Aspire.Hosting/Dcp/DcpModelUtilities.cs - Modified
  • src/Aspire.Hosting/Dcp/ExecutableCreator.cs - Modified
  • tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs - Modified
  • tests/Aspire.Hosting.Tests/Dcp/TestKubernetesService.cs - Modified

Change Categories

  • CLI changes detected
  • Hosting changes
  • Dashboard changes
  • Template changes
  • Client/Component changes
  • Test changes

Test Scenarios Executed

Scenario 1: PR CLI install and version verification

Objective: Install the dogfood CLI for PR #17825 into an isolated temp directory and verify it reports the PR head commit.
Coverage Type: Setup / prerequisite
Status: ✅ Passed

Steps:

  1. Installed the dogfood CLI from the PR comment into an isolated temp directory with --install-path, --skip-path, and --skip-extension.
  2. Ran the installed binary directly with --version.
  3. Compared the reported version to the PR head commit.

Evidence:

  • Install/version log: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/install-info.txt
  • Full install log: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/install.log

Observations:

  • Installed version: 13.5.0-pr.17825.gdd3261e0
  • Version includes PR commit short SHA dd3261e0.

Scenario 2: Session-scoped explicit-start executable defers callback

Objective: Verify a session-scoped explicit-start executable does not evaluate a WithEnvironment callback at AppHost startup, and does evaluate it on manual start.
Coverage Type: Happy path
Status: ✅ Passed

Steps:

  1. Created a fresh aspire-empty app from the PR package hive.
  2. Added manual-env, a session-scoped executable with WithExplicitStart() and a marker-writing WithEnvironment callback.
  3. Added startup-throw-if-evaluated, a session-scoped executable whose WithEnvironment callback throws if evaluated.
  4. Started the AppHost in the background.
  5. Verified initial resource state was NotStarted and no marker existed for manual-env or startup-throw-if-evaluated.
  6. Ran aspire resource <manual-env-resource> start.
  7. Verified manual-env wrote exactly one marker and reached Finished with exit code 0.

Evidence:

  • Test AppHost source: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/executable-apphost.cs
  • Start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/start-output.txt
  • Initial describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/describe-after-start.json
  • Manual start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/manual-start-output.txt
  • Final describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/describe-after-manual-starts.json
  • Marker counts: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/marker-counts-after-starts.txt

Observations:

  • Initial markers after AppHost startup: only persistent-env.txt existed.
  • Final marker counts: manual-env 1, persistent-env 1, startup-throw-if-evaluated 0.
  • startup-throw-if-evaluated stayed NotStarted, proving its callback did not run during startup.

Scenario 3: Persistent explicit-start executable does not evaluate callback twice

Objective: Verify a persistent explicit-start executable evaluates configuration during AppHost startup registration, then manual start only flips DCP start state without re-running callbacks.
Coverage Type: Boundary
Status: ✅ Passed

Steps:

  1. Added persistent-env, a persistent executable with WithExplicitStart() and a marker-writing WithEnvironment callback.
  2. Started the AppHost.
  3. Verified persistent-env was registered as NotStarted and wrote exactly one marker during startup.
  4. Ran aspire resource <persistent-env-resource> start.
  5. Verified marker count remained exactly one after manual start.

Evidence:

  • Initial describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/describe-after-start.json
  • Persistent start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/persistent-start-output.txt
  • Final describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/describe-after-manual-starts.json
  • Marker counts: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/marker-counts-after-starts.txt

Observations:

  • persistent-env had creationTimestamp at startup and state: NotStarted, confirming eager DCP registration.
  • Marker count remained persistent-env 1 after manual start, confirming no duplicate callback evaluation.

Scenario 4: Container explicit-start parity

Objective: Verify the same callback deferral and persistent no-second-evaluation behavior for containers using the same long-running command.
Coverage Type: Happy path / boundary
Status: ✅ Passed

Steps:

  1. Confirmed Docker was available.
  2. Created a second fresh aspire-empty app from the PR package hive.
  3. Added manual-container-env, a session-scoped explicit-start Alpine container using /bin/sh -c "while true; do sleep 3600; done" and a marker-writing WithEnvironment callback.
  4. Added persistent-container-env, a persistent explicit-start Alpine container using the same command and a marker-writing WithEnvironment callback.
  5. Started the AppHost and verified only persistent-container-env wrote a marker during registration.
  6. Manually started both containers and waited for each to become up.
  7. Verified manual-container-env marker count was 1 and persistent-container-env marker count remained 1.
  8. Stopped both resources and the AppHost, then removed the persistent test container if Docker retained it.

Evidence:

  • Test AppHost source: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/container-apphost.cs
  • Start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/container-start-output.txt
  • Initial describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/container-describe-after-start.json
  • Manual container start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/manual-container-start-output.txt
  • Persistent container start output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/persistent-container-start-output.txt
  • Wait outputs: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/manual-container-wait-output.txt, /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/persistent-container-wait-output.txt
  • Final describe output: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/container-describe-after-manual-starts.json
  • Marker counts: /Users/dnegstad/.copilot/session-state/5afc7e71-b9d1-4dc0-8977-fd7e40047121/files/pr-17825-testing/container-marker-counts-after-starts.txt

Observations:

  • Initial container markers after startup: only persistent-container-env.txt existed.
  • Both containers reached Running and Healthy after manual start.
  • Marker counts after manual starts: manual-container-env 1, persistent-container-env 1.

Unhappy-Path Coverage

Callback-that-would-fail-at-startup

Expected Outcome: AppHost startup succeeds and the resource remains NotStarted; the callback exception is not thrown until the resource is explicitly started.
Status: ✅ Passed

startup-throw-if-evaluated remained NotStarted and wrote no marker during startup, so session-scoped explicit-start callbacks are not evaluated during AppHost startup.

Persistent repeated start boundary

Expected Outcome: Manual start of an already-created persistent explicit-start resource does not duplicate callback side effects.
Status: ✅ Passed

Both persistent executable and persistent container marker counts remained at one after manual start.

Summary

Scenario Status Notes
PR CLI install and version verification ✅ Passed Installed CLI version 13.5.0-pr.17825.gdd3261e0 matches PR commit.
Session-scoped explicit-start executable defers callback ✅ Passed Callback ran only after manual start.
Persistent explicit-start executable does not evaluate callback twice ✅ Passed Startup callback count remained one after manual start.
Container explicit-start parity ✅ Passed Session and persistent containers matched expected behavior.
Callback-that-would-fail-at-startup ✅ Passed AppHost startup remained safe; resource stayed NotStarted.

Overall Result

✅ PR VERIFIED

Recommendations

  • No issues found in the tested scenarios.

@danegsta

Copy link
Copy Markdown
Member Author

/backport to release/13.4

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/13.4 (link to workflow run)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall but there are a few minor issues worth correcting (or, in one case, considering) before merging.

Comment thread src/Aspire.Hosting/Dcp/DcpExecutor.cs Resolved
Comment thread src/Aspire.Hosting/Dcp/DcpExecutor.cs Resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@danegsta

Copy link
Copy Markdown
Member Author

/backport to release/13.4

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/13.4 (link to workflow run)

@danegsta
David Negstad (danegsta) enabled auto-merge (squash) June 2, 2026 18:10
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
GitHub was asked to rerun all failed jobs for that attempt, and the rerun is being tracked in the rerun attempt.
The job links below point to the failed attempt jobs that matched the retry-safe transient failure rules.

@danegsta
David Negstad (danegsta) merged commit 9ae55a9 into main Jun 2, 2026
618 of 621 checks passed
@danegsta
David Negstad (danegsta) deleted the danegsta/fix-explicit-start-args branch June 2, 2026 18:59
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.5 milestone Jun 2, 2026
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

❓ CLI E2E Tests unknown — 110 passed, 0 failed, 2 unknown (commit afca950)

View all recordings
- Test Detail
✅ AddPackageInteractiveWhileAppHostRunningDetached Recording · Job · CLI logs
✅ AddPackageWhileAppHostRunningDetached Recording · Job · CLI logs
✅ AgentCommands_AllHelpOutputs_AreCorrect Recording · Job · CLI logs
✅ AgentInitCommand_DefaultSelection_InstallsDefaultSkills Recording · Job · CLI logs
✅ AgentInitCommand_MigratesDeprecatedConfig Recording · Job · CLI logs
✅ AgentInit_NonInteractive_BundleOnlySkillsNotInCatalog Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_DevLocalhost Recording · Job · CLI logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_Isolated Recording · Job · CLI logs
✅ AllPublishMethodsBuildDockerImages Recording · Job · CLI logs
✅ AspireAddAndStartWorkAgainstLegacyAppHostTs Recording · Job · CLI logs
✅ AspireAddPackageVersionToDirectoryPackagesProps Recording · Job · CLI logs
✅ AspireInitSingleFileAppHostRunsViaDotnetRunAppHost Recording · Job · CLI logs
✅ AspireInit_ExistingAppHostDir_RecreatesNuGetConfigKeepsFiles Recording · Job · CLI logs
❔ AspireInit_SolutionFile_BuildsAgainstChannelHive Recording · Job · CLI logs
✅ AspireStartUpdatesStaleTypeScriptAppHostPath Recording · Job · CLI logs
✅ AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps Recording · Job · CLI logs
✅ AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent Recording · Job · CLI logs
✅ Banner_DisplayedOnFirstRun Recording · Job · CLI logs
✅ Banner_DisplayedWithExplicitFlag Recording · Job · CLI logs
✅ Banner_NotDisplayedWithNoLogoFlag Recording · Job · CLI logs
✅ CertificatesClean_RemovesCertificates Recording · Job · CLI logs
✅ CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate Recording · Job · CLI logs
✅ CertificatesTrust_WithUntrustedCert_TrustsCertificate Recording · Job · CLI logs
✅ ConfigSetGet_CreatesNestedJsonFormat Recording · Job · CLI logs
✅ CreateAndRunAspireStarterProject Recording · Job · CLI logs
✅ CreateAndRunAspireStarterProjectWithBundle Recording · Job · CLI logs
✅ CreateAndRunEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunJavaEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunJsReactProject Recording · Job · CLI logs
✅ CreateAndRunPolyglotAppHostWithDevLocalhostUrls Recording · Job · CLI logs
✅ CreateAndRunPythonReactProject Recording · Job · CLI logs
✅ CreateAndRunTypeScriptEmptyAppHostProject Recording · Job · CLI logs
✅ CreateAndRunTypeScriptStarterProject Recording · Job · CLI logs
✅ CreateJavaAppHostWithViteApp Recording · Job · CLI logs
✅ CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain Recording · Job · CLI logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces Recording · Job · CLI logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces_DevLocalhost Recording · Job · CLI logs
✅ DashboardRunWithOtelTracesReturnsNoTraces Recording · Job · CLI logs
✅ DashboardRunWithOtelTracesReturnsNoTraces_DevLocalhost Recording · Job · CLI logs
✅ DeployK8sBasicApiService Recording · Job · CLI logs
✅ DeployK8sWithExternalHelmChart Recording · Job · CLI logs
✅ DeployK8sWithGarnet Recording · Job · CLI logs
✅ DeployK8sWithMongoDB Recording · Job · CLI logs
✅ DeployK8sWithMySql Recording · Job · CLI logs
✅ DeployK8sWithPostgres Recording · Job · CLI logs
✅ DeployK8sWithRabbitMQ Recording · Job · CLI logs
✅ DeployK8sWithRedis Recording · Job · CLI logs
✅ DeployK8sWithSqlServer Recording · Job · CLI logs
✅ DeployK8sWithValkey Recording · Job · CLI logs
✅ DeployTypeScriptAppToKubernetes Recording · Job · CLI logs
✅ DescribeCommandResolvesReplicaNames Recording · Job · CLI logs
✅ DescribeCommandShowsRunningResources Recording · Job · CLI logs
✅ DetachFormatJsonProducesValidJson Recording · Job · CLI logs
✅ DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance Recording · Job · CLI logs
✅ DoPublishAndDeployListStepsWork Recording · Job · CLI logs
✅ DocsCommand_RendersInteractiveMarkdownFromLocalSource Recording · Job · CLI logs
✅ DoctorCommand_DetectsDeprecatedAgentConfig Recording · Job · CLI logs
✅ DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain Recording · Job · CLI logs
✅ DoctorCommand_WithSslCertDir_ShowsTrusted Recording · Job · CLI logs
✅ DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted Recording · Job · CLI logs
✅ GatewayWithoutExternalEndpoint_FailsPublishWithGuidance Recording · Job · CLI logs
✅ GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain Recording · Job · CLI logs
✅ GlobalMigration_HandlesCommentsAndTrailingCommas Recording · Job · CLI logs
✅ GlobalMigration_HandlesMalformedLegacyJson Recording · Job · CLI logs
✅ GlobalMigration_PreservesAllValueTypes Recording · Job · CLI logs
✅ GlobalMigration_SkipsWhenNewConfigExists Recording · Job · CLI logs
✅ GlobalSettings_MigratedFromLegacyFormat Recording · Job · CLI logs
✅ IngressWithoutExternalEndpoint_FailsPublishWithGuidance Recording · Job · CLI logs
✅ InitTypeScriptAppHost_AugmentsExistingViteRepoInWorkspaceSubdirectory Recording · Job · CLI logs
✅ InteractiveCSharpInitCreatesExpectedFiles Recording · Job · CLI logs
✅ InvalidAppHostPathWithComments_IsHealedOnRun Recording · Job · CLI logs
✅ JavaScriptHostingApisRunFromTypeScriptAppHost Recording · Job · CLI logs
✅ LatestCliCanStartStableChannelAppHost Recording · Job · CLI logs
✅ LatestCliCanStartStableChannelTypeScriptAppHost Recording · Job · CLI logs
✅ LegacySettingsMigration_AdjustsRelativeAppHostPath Recording · Job · CLI logs
✅ LogsCommandShowsResourceLogs Recording · Job · CLI logs
✅ OtelLogsReturnsStructuredLogsFromStarterApp Recording · Job · CLI logs
✅ OtelLogsReturnsStructuredLogsFromStarterAppIsolated Recording · Job · CLI logs
✅ PsCommandListsRunningAppHost Recording · Job · CLI logs
✅ PsFormatJsonOutputsOnlyJsonToStdout Recording · Job · CLI logs
✅ PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts Recording · Job · CLI logs
✅ PublishWithConfigureEnvFileUpdatesEnvOutput Recording · Job · CLI logs
✅ PublishWithDockerComposeServiceCallbackSucceeds Recording · Job · CLI logs
✅ PublishWithoutOutputPathUsesAppHostDirectoryDefault Recording · Job · CLI logs
✅ ResourceCommand_FailedExec_ShowsLogPathAndLogHasEntries Recording · Job · CLI logs
✅ ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput Recording · Job · CLI logs
✅ RestoreGeneratesSdkFiles Recording · Job · CLI logs
✅ RestoreGeneratesSdkFiles_WithConfiguredToolchain Recording · Job · CLI logs
✅ RestoreRefreshesGeneratedSdkAfterAddingIntegration Recording · Job · CLI logs
✅ RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes Recording · Job · CLI logs
✅ RunFromParentDirectory_UsesExistingConfigNearAppHost Recording · Job · CLI logs
✅ RunReportsSyntaxErrorsForDotNetAppHost Recording · Job · CLI logs
✅ RunReportsSyntaxErrorsForTypeScriptAppHost Recording · Job · CLI logs
✅ SecretCrudOnDotNetAppHost Recording · Job · CLI logs
✅ SecretCrudOnTypeScriptAppHost Recording · Job · CLI logs
✅ StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels Recording · Job · CLI logs
✅ StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets Recording · Job · CLI logs
✅ StartReportsSyntaxErrorsForDotNetAppHost Recording · Job · CLI logs
✅ StartReportsSyntaxErrorsForTypeScriptAppHost Recording · Job · CLI logs
✅ StopAllAppHostsFromAppHostDirectory Recording · Job · CLI logs
✅ StopJavaPolyglotAppHostUsingApphostDirectory Recording · Job · CLI logs
✅ StopNonInteractiveSingleAppHost Recording · Job · CLI logs
✅ StopTypeScriptPolyglotAppHostUsingApphostDirectory Recording · Job · CLI logs
✅ StopWithNoRunningAppHostExitsSuccessfully Recording · Job · CLI logs
✅ TypeScriptAppHostRunDoesNotDeadlockWhenLazyOptionsInvokeAsyncCallback Recording · Job · CLI logs
✅ TypeScriptAppHostWithVite_AllowsDifferentGuestPkgManager Recording · Job · CLI logs
✅ UnAwaitedChainsCompileWithAutoResolvePromises Recording · Job · CLI logs
❔ UpdateToStable_CSharpEmptyAppHost_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_CSharpSingleFileInit_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_TypeScriptSingleFileInit_KeepsConfigChannel Recording · Job · CLI logs
✅ UpdateToStable_TypeScript_PreviewsStablePkgsAndKeepsChannel Recording · Job · CLI logs

📹 Recordings uploaded automatically from CI run #26837904558

aspire-repo-bot Bot added a commit to microsoft/aspire.dev that referenced this pull request Jun 2, 2026
Add a new 'Defer resource start with explicit start' section to
resource-lifetimes.mdx explaining how WithExplicitStart() interacts
with execution configuration callbacks (WithEnvironment, WithArgs):

- Session-scoped explicit-start resources defer DCP registration until
  manual start, so callbacks run only when the user starts the resource
  from the dashboard.
- Persistent explicit-start resources are registered immediately (to
  detect existing instances), but use a Spec.Start patch on manual
  start so callbacks are not re-evaluated a second time.

Documents microsoft/aspire#17825.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1194

Generated by PR Documentation Check · sonnet46 3.6M

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1194 targeting release/13.4.

Added a new "Defer resource start with explicit start" section to src/frontend/src/content/docs/app-host/resource-lifetimes.mdx documenting how WithExplicitStart() defers execution configuration callbacks. Session-scoped explicit-start resources now defer DCP registration until manual start (callbacks run only on manual start); persistent explicit-start resources are still registered at startup but patched to start (no re-prompting).

File modified:

  • src/frontend/src/content/docs/app-host/resource-lifetimes.mdx

Note

This draft PR needs human review before merging.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WithArgs runs on startup even if WithExplicitStart is called on a service in 13.4.0

4 participants