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
{{ message }}
Repository navigation
Don't probe the container runtime at startup when the app has no containers - #21957
What failed. On Windows runners, the Deno functional tests (DenoTelemetryFunctionalTests.VerifyDenoAppExportsNativeTelemetryToDashboard, DenoFunctionalTests.VerifyDenoAppDirectExecutionWorks, DenoFunctionalTests.VerifyDenoAppTaskScriptWorks) and other DCP-backed fixtures fail in InitializeAsync with:
Aspire.Hosting.DistributedApplicationException : Application orchestrator dependency check returned an error: The operation has timed out.
dcp.info.os-executor Context expired, stopping process... {"Command": "C:\\Windows\\system32\\docker.exe", "Args": ["--version"]}
Why.DcpHost.EnsureDcpContainerRuntimeAsync and DcpExecutor.RunApplicationAsync ran dcp info on every run-mode start. dcp info probes the container runtime CLI (docker --version). When that CLI is slow or hung on a busy Windows runner, DCP spends about 10s on the probe and then about 15s stopping it. That lands right on Aspire's 25s DependencyCheckTimeout, so startup fails even for apps with no containers. The Deno fixtures only have executables, so the container-runtime result is never used.
How it's fixed.
IDcpDependencyCheckService gains GetDcpVersionAsync. It validates the DCP install and minimum version with dcp version, which prints the same {"version": ...} JSON but doesn't probe the container runtime. dcp version is supported back to the minimum DCP 0.23.3. DcpDependencyCheck keeps one nullable _dcpInfo with the last successful result: a version check reuses any cached result, and a full-info check reuses it only when it includes container status. A failed or cancelled probe leaves the cache unchanged, so it is retried.
Empty stdout or a JSON null from DCP now throws a dependency-check exception instead of returning null, so startup can't continue without a validated DCP version.
DcpHost and DcpExecutor use GetDcpVersionAsync when the model has no container resources. Apps with containers keep the full dcp info check and still fail loudly when the runtime is unhealthy.
HostUrl and ContainerNetworkEndpointProvisioner still call dcp info, but only for container networks, so executables never reach them.
This is a product-layer fix, so it covers every executable-only app and test fixture, not just Deno. It complements the test-only approaches in #21928 and #21939, which avoid DCP in tests that don't need it. Neither of those covers the Deno tests.
Fixes#21771 Fixes#21848
Related: #20850 (same Deno fixture; that report is a different DCP SQLite startup crash and is not addressed here)
Confidence
High that this removes the docker --version timeout for executable-only apps. On that path the failing call is no longer made, as the paired unit tests and the real-DCP repro with a hung docker show. The main limit is volume: the probe signature has only 4 CI hits in 14 days, and none since 11-06 21:06Z, so CI can't yet confirm the fix by itself. Most of the Deno failures in the 14-day window have other causes (see below). Those stopped after the DCP 0.27.3 bump and are not addressed here.
How we stop this recurring: startup for apps without containers no longer depends on how responsive the container-runtime CLI is. The new DcpHost and DcpExecutor tests fail if a no-container path starts calling dcp info again.
Failure stats (14d, attempt 1)
Window: 10-26 10:00Z to 11-09 10:00Z, ci.yml, attempt 1 only. The denominator is the 757 runs where a Hosting.JavaScript job executed and finished (157 main + 600 PR). One PR run is excluded as PR-caused: every Node and Deno test failed on both OSes, and the reruns kept failing.
46 runs had at least one Deno failure (11 main, 35 PR). By cause:
DCP probe timeout (dependency check returned an error / docker.exe --version), which this PR fixes: 4 runs (2 main, 2 PR), 11-05 17:38Z to 11-06 21:06Z, all three tests each time. Both PR runs passed on rerun; the main runs weren't rerun.
2-minute Polly timeout in fixture init: 26 runs, last 11-03 00:36Z.
Service … should have valid address at this point: 16 runs, last 11-02 15:08Z.
The last two causes stopped after the DCP 0.27.3 bump (#21706, merged 11-03 05:38Z). Since 11-03, every Deno failure has been the probe signature (4/334 runs, 1.2%). The tracker #21600 counts 20/17/17 over all 1,173 decided ci.yml runs. Its numerator and denominator differ from this job-level count. The same probe signature also hits other executable-only fixtures (Hosting.Testing, Hosting.DotnetTool, Hosting-N); see #21771. Those are not counted here.
Still hits main? Last main hit was 11-06 03:34Z (probe). There have been no hits in the 68 runs since 11-06 21:06Z (13 of them on main).
Local before/after: the no-container regression tests fail without the fix and pass 3/3 with it. With a hung docker on PATH, all 3 real Deno tests fail fixture init without the fix. With the fix, VerifyDenoAppDirectExecutionWorks and VerifyDenoAppTaskScriptWorks pass 3/3, and the telemetry test gets past fixture init (details under Evidence).
This PR's CI: on the current head (rebased onto main), Final Results passed on attempt 1 (42749913164), with no reruns. Every job passed, including Hosting.JavaScript (where the Deno tests run) and Hosting-1..6 on Windows and Ubuntu. The only red run on the head is the Copilot code-review bot, which timed out waiting for a runner; it is not a CI test job.
Verdict: MODERATE. The fix removes the exact call behind all 4 probe-signature failures, and a deterministic local repro flips from fail to pass. But with only 4 hits in 14 days and none since 11-06, CI can't confirm it yet.
Evidence (paired, local Linux)
Root cause with real DCP 0.27.3 and a fake docker that hangs:
command
result
dcp info --container-runtime docker
25s, Context expired, stopping process... docker --version (the CI signature)
dcp version
0s, {"version":"0.27.3",...}
Re-checked with DCP 0.27.4 (current main): dcp version returns only version fields, and dcp info always includes a containers block, even when docker fails or isn't on PATH. So Containers != null reliably identifies a cached dcp info result.
DcpHostNotificationTests.DependencyCheck_ThrowsWhenDcpReturnsNoInformation (empty / null output, version and info)
❌ (returned null)
✅
All 377 tests in DcpHostNotificationTests and DcpExecutorTests pass on the current head.
The real Deno tests, with a hung docker on PATH and ASPIRE_DEPENDENCY_CHECK_TIMEOUT=8 to make the race deterministic:
Without fix: all 3 Deno tests fail in fixture init with Application orchestrator dependency check returned an error: The operation has timed out.
With fix: both fixtures initialize, and VerifyDenoAppDirectExecutionWorks and VerifyDenoAppTaskScriptWorks pass 3/3. The telemetry test gets past fixture init. Its dashboard-query step times out in this sandbox on main as well, with or without the hung docker, so that part is environmental and unrelated.
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
No
Does the change make any security assumptions or guarantees?
DcpHost and DcpExecutor ran 'dcp info' on every run-mode start. 'dcp info'
probes the container runtime CLI (docker --version), which can hang on busy
Windows runners past the 25s dependency check timeout and fail startup even
for apps without containers (#21771, #21848).
Add IDcpDependencyCheckService.GetDcpVersionAsync, which validates the DCP
installation and minimum version with 'dcp version' (no container probe), and
use it when the model has no container resources. Apps with containers keep
the full 'dcp info' check.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RunApplicationAsync must use 'dcp version' when the model has no
containers, otherwise it runs 'dcp info' right after DcpHost and can still
hang on an unresponsive container runtime CLI (#21771).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
DCP checks mark themselves complete before succeeding, allowing failed probes to make subsequent calls return null without validation, retrying, or reusing a valid cached version result.
This PR removes container-runtime probing from executable-only app startup while preserving DCP installation and version validation. Apps with containers retain the full runtime health check.
Changes:
Adds a cached dcp version check that avoids probing Docker or Podman.
Routes host and executor startup checks according to whether the model contains containers.
Adds regression tests and dependency-check call counters.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The Windows tests launch a .cmd file without a command interpreter, causing a startup failure that breaks the no-container case and can falsely satisfy the container case’s generic error assertion instead of verifying a timeout.
On Windows, ProcessUtil.Run launches this .cmd file with UseShellExecute = false and no command interpreter, so the no-container test fails at process startup instead of checking dcp version. The container test can pass for the same wrong reason because it only asserts the generic dependency-error prefix. Use an executable fake or a test launch seam that invokes cmd.exe /c, and assert that the container failure is actually a timeout.
A failed or cancelled 'dcp version' probe no longer leaves the check marked
done, and a failed 'dcp info' check no longer short-circuits the version-only
path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Devin Breshears (@dbreshears), could you review this as the orchestrator area owner? It's ready, and Final Results is green on the current head. It skips the dcp info container-runtime probe at startup when the app has no containers. That probe's docker --version timeout has been behind every Deno functional test failure since 11-03. The PR body has the 14-day stats.
GitHub wouldn't let me add you or the area-orchestrator team as formal reviewers (neither is a collaborator on this repo), so I'm asking here instead.
AspireAgent stopped work here: review threads are answered, the description is updated, CI is green on the head, and the PR is waiting on human review.
Collapse the separate version and info caches into one nullable _dcpInfo
that holds the last successful check. GetDcpVersionAsync reuses any cached
result; GetDcpInfoAsync reuses it only when it includes container status.
Empty stdout or a JSON null from DCP now throws a dependency-check
exception instead of returning null, so startup can't continue without a
validated DCP version.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Triggered signals (1): pr_body_has_cli_flag_mention. Evidence: <pr-body> matched "Args": ["--version"] in a quoted CI error log (docker.exe --version), which is not an Aspire CLI flag.
The PR changes internal DCP startup behavior. Executable-only apps now run dcp version instead of dcp info, which avoids a container runtime probe timeout. It adds IDcpDependencyCheckService.GetDcpVersionAsync (internal hosting plumbing) and introduces no new user-facing option, config key, API, or documented behavior.
Apps with containers keep the full check and the same failure behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What failed. On Windows runners, the Deno functional tests (
DenoTelemetryFunctionalTests.VerifyDenoAppExportsNativeTelemetryToDashboard,DenoFunctionalTests.VerifyDenoAppDirectExecutionWorks,DenoFunctionalTests.VerifyDenoAppTaskScriptWorks) and other DCP-backed fixtures fail inInitializeAsyncwith:Example runs: 42157416383 (Hosting.JavaScript), 42076556098 (Hosting.JavaScript), 41910295423 (Hosting-2, Hosting.DotnetTool), 42088737959 (Hosting.Testing), 42253714471 (Hosting-4).
Why.
DcpHost.EnsureDcpContainerRuntimeAsyncandDcpExecutor.RunApplicationAsyncrandcp infoon every run-mode start.dcp infoprobes the container runtime CLI (docker --version). When that CLI is slow or hung on a busy Windows runner, DCP spends about 10s on the probe and then about 15s stopping it. That lands right on Aspire's 25sDependencyCheckTimeout, so startup fails even for apps with no containers. The Deno fixtures only have executables, so the container-runtime result is never used.How it's fixed.
IDcpDependencyCheckServicegainsGetDcpVersionAsync. It validates the DCP install and minimum version withdcp version, which prints the same{"version": ...}JSON but doesn't probe the container runtime.dcp versionis supported back to the minimum DCP 0.23.3.DcpDependencyCheckkeeps one nullable_dcpInfowith the last successful result: a version check reuses any cached result, and a full-info check reuses it only when it includes container status. A failed or cancelled probe leaves the cache unchanged, so it is retried.nullfrom DCP now throws a dependency-check exception instead of returning null, so startup can't continue without a validated DCP version.DcpHostandDcpExecutoruseGetDcpVersionAsyncwhen the model has no container resources. Apps with containers keep the fulldcp infocheck and still fail loudly when the runtime is unhealthy.HostUrlandContainerNetworkEndpointProvisionerstill calldcp info, but only for container networks, so executables never reach them.This is a product-layer fix, so it covers every executable-only app and test fixture, not just Deno. It complements the test-only approaches in #21928 and #21939, which avoid DCP in tests that don't need it. Neither of those covers the Deno tests.
Fixes #21771
Fixes #21848
Related: #20850 (same Deno fixture; that report is a different DCP SQLite startup crash and is not addressed here)
Confidence
High that this removes the
docker --versiontimeout for executable-only apps. On that path the failing call is no longer made, as the paired unit tests and the real-DCP repro with a hungdockershow. The main limit is volume: the probe signature has only 4 CI hits in 14 days, and none since 11-06 21:06Z, so CI can't yet confirm the fix by itself. Most of the Deno failures in the 14-day window have other causes (see below). Those stopped after the DCP 0.27.3 bump and are not addressed here.How we stop this recurring: startup for apps without containers no longer depends on how responsive the container-runtime CLI is. The new
DcpHostandDcpExecutortests fail if a no-container path starts callingdcp infoagain.Failure stats (14d, attempt 1)
Window: 10-26 10:00Z to 11-09 10:00Z,
ci.yml, attempt 1 only. The denominator is the 757 runs where aHosting.JavaScriptjob executed and finished (157 main + 600 PR). One PR run is excluded as PR-caused: every Node and Deno test failed on both OSes, and the reruns kept failing.DenoTelemetryFunctionalTests.VerifyDenoAppExportsNativeTelemetryToDashboardDenoFunctionalTests.VerifyDenoAppDirectExecutionWorksDenoFunctionalTests.VerifyDenoAppTaskScriptWorks46 runs had at least one Deno failure (11 main, 35 PR). By cause:
dependency check returned an error/docker.exe --version), which this PR fixes: 4 runs (2 main, 2 PR), 11-05 17:38Z to 11-06 21:06Z, all three tests each time. Both PR runs passed on rerun; the main runs weren't rerun.Service … should have valid address at this point: 16 runs, last 11-02 15:08Z.The last two causes stopped after the DCP 0.27.3 bump (#21706, merged 11-03 05:38Z). Since 11-03, every Deno failure has been the probe signature (4/334 runs, 1.2%). The tracker #21600 counts 20/17/17 over all 1,173 decided
ci.ymlruns. Its numerator and denominator differ from this job-level count. The same probe signature also hits other executable-only fixtures (Hosting.Testing, Hosting.DotnetTool, Hosting-N); see #21771. Those are not counted here.Runs: 42076556098 (main, probe), 42157416383 (main, probe), 42246915065 (PR, probe), 42293916898 (PR, probe), 41554110222 (main, older Polly-timeout cause).
dockeron PATH, all 3 real Deno tests fail fixture init without the fix. With the fix,VerifyDenoAppDirectExecutionWorksandVerifyDenoAppTaskScriptWorkspass 3/3, and the telemetry test gets past fixture init (details under Evidence).Hosting.JavaScript(where the Deno tests run) and Hosting-1..6 on Windows and Ubuntu. The only red run on the head is the Copilot code-review bot, which timed out waiting for a runner; it is not a CI test job.Verdict: MODERATE. The fix removes the exact call behind all 4 probe-signature failures, and a deterministic local repro flips from fail to pass. But with only 4 hits in 14 days and none since 11-06, CI can't confirm it yet.
Evidence (paired, local Linux)
Root cause with real DCP 0.27.3 and a fake
dockerthat hangs:dcp info --container-runtime dockerContext expired, stopping process... docker --version(the CI signature)dcp version{"version":"0.27.3",...}Re-checked with DCP 0.27.4 (current main):
dcp versionreturns only version fields, anddcp infoalways includes acontainersblock, even whendockerfails or isn't on PATH. SoContainers != nullreliably identifies a cacheddcp inforesult.Regression tests (
Aspire.Hosting.Tests):DcpHostNotificationTests.EnsureDcpContainerRuntimeAsync_WithoutContainers_DoesNotWaitForContainerRuntimeProbedependency check returned an error: The operation has timed outDcpExecutorTests.RunApplicationAsync_WithoutContainers_DoesNotProbeContainerRuntimeGetDcpInfoAsyncwas calledDcpHostNotificationTests.EnsureDcpContainerRuntimeAsync_WithContainers_ReportsContainerRuntimeProbeTimeoutDcpExecutorTests.RunApplicationAsync_WithContainers_ProbesContainerRuntimeDcpHostNotificationTests.GetDcpVersionAsync_RetriesAfterFailedCheckDcpHostNotificationTests.DependencyCheck_ThrowsWhenDcpReturnsNoInformation(empty /nulloutput,versionandinfo)All 377 tests in
DcpHostNotificationTestsandDcpExecutorTestspass on the current head.The real Deno tests, with a hung
dockeron PATH andASPIRE_DEPENDENCY_CHECK_TIMEOUT=8to make the race deterministic:Application orchestrator dependency check returned an error: The operation has timed out.VerifyDenoAppDirectExecutionWorksandVerifyDenoAppTaskScriptWorkspass 3/3. The telemetry test gets past fixture init. Its dashboard-query step times out in this sandbox onmainas well, with or without the hungdocker, so that part is environmental and unrelated.Checklist
🤖 Posted by AspireAgent (AI Agent)