microsoft / microsoft/aspire

Published Yarp doesn't copy config file

Open
#10,016 0 comments 0 reactions 0 assignees View on GitHub
area-integrations
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

When Yarp container is started, there was an error complaining missing config file when inspect the log from container.
But when in development mode (pressing F5 in VS) the container start just fine with no error.

With aspire publish
https://github.com/user-attachments/assets/815a5b0f-fbf6-4be4-a18c-12ee0de53d31

Same project in development mode
https://github.com/user-attachments/assets/9be296ed-f80c-40a2-9b2a-d9c3f11ee990

### Expected Behavior

The container can be started and yarp.config file was copied to the container.

### Steps To Reproduce

Clone this repo https://github.com/SackMaggie/aspire-yarp-test.git
Build the image and compose using `aspire publish`
Use podman compose up
The error `Could not find '/etc/yarp.config'.` should show up

### Exceptions (if any)

From yarp container
`Could not find '/etc/yarp.config'.`

### .NET Version info

```
.NET SDK:
Version: 9.0.301
Commit: a596cd22e2
Workload version: 9.0.300-manifests.e42facbb
MSBuild version: 17.14.5+edd3bbf37

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.301\

.NET workloads installed:
[android]
Installation Source: SDK 9.0.300, VS 17.14.36212.18
Manifest Version: 35.0.78/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.78\WorkloadManifest.json
Install Type: Msi

[aspire]
Installation Source: SDK 9.0.300, VS 17.14.36212.18
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: SDK 9.0.300, VS 17.14.36212.18
Manifest Version: 18.5.9199/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.5.9199\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: SDK 9.0.300, VS 17.14.36212.18
Manifest Version: 18.5.9199/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.5.9199\WorkloadManifest.json
Install Type: Msi

[maui-windows]
Installation Source: SDK 9.0.300, VS 17.14.36212.18
Manifest Version: 9.0.51/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.51\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.6
Architecture: x64
Commit: 3875b54e7b

.NET SDKs installed:
8.0.411 [C:\Program Files\dotnet\sdk]
9.0.301 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.6 [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?

IDE : visual studio
Container runner : podman
```
// SDK for apphost

// Packages used


true
true
$(NoWarn);NU1507




















```

Contributor guide

Open the contributing guide

Research direction

Start with the linked aspire-yarp-test reproduction and compare the output from `aspire publish` with development-mode container behavior. Inspect the generated compose and container configuration, then run `podman compose up`; done means the Yarp container receives `yarp.config` at `/etc/yarp.config` without the reported error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.