microsoft / microsoft/aspire

Duplicate Errors when adding executable with invalid path

Open
#5,060 1 comment 0 reactions 0 assignees View on GitHub
area-orchestrator
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 12h
Merged PRs (30d)
201

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

If you create a process with an invalid executable resource, you get 2 duplicate errors logged.

### Expected Behavior

Only one error logged to the console

### Steps To Reproduce

var failToStart = builder.AddExecutable("failToStart", "DoesNotExist.exe", ".");

### Exceptions (if any)

```
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
failed to start a process {"Executable": {"name":"failToStart-nbtjyuud"}, "Reconciliation": 8, "error": "exec: \"DoesNotExist.exe\": executable file not found in %PATH%"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
failed to start Executable {"Executable": {"name":"failToStart-nbtjyuud"}, "Reconciliation": 8, "error": "exec: \"DoesNotExist.exe\": executable file not found in %PATH%"}
```

### .NET Version info

```
.NET SDK:
Version: 8.0.303
Commit: 29ab8e3268
Workload version: 8.0.300-manifests.d7126b9e
MSBuild version: 17.10.4+10fbfbf2e

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.303\

.NET workloads installed:
[aspire]
Installation Source: SDK 8.0.300, VS 17.10.35004.147
Manifest Version: 8.1.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.1.0\WorkloadManifest.json
Install Type: FileBased

Host:
Version: 8.0.7
Architecture: x64
Commit: 2aade6beb0

.NET SDKs installed:
8.0.300 [C:\Program Files\dotnet\sdk]
8.0.303 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the AddExecutable("failToStart", "DoesNotExist.exe", ".") entry point, then trace how ExecutableReconciler reports the failed start. Confirm that the invalid executable produces only one console error instead of the two messages shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.