Skip to content

Fix executable Source column showing raw DCP template expressions instead of resolved argument values#16423

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/fix-dashboard-executable-arguments
Draft

Fix executable Source column showing raw DCP template expressions instead of resolved argument values#16423
Copilot wants to merge 3 commits intomainfrom
copilot/fix-dashboard-executable-arguments

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

The dashboard Source column for executables with endpoint property references (e.g. endpoint.Property(EndpointProperty.TargetPort)) displayed raw DCP template expressions like {{- portForServing "exe" -}} instead of the resolved values already visible in the Executable arguments detail property.

Root cause

AppArgs (used by the Source column) is populated at executable creation time — before DCP resolves template expressions. Dynamic port references store the literal DCP template string. EffectiveArgs (populated post-run by DCP) has the actual resolved values, but was only used as a fallback when AppArgs was absent.

var app = builder.AddExecutable("exe", "pwsh.exe", ".")
    .WithHttpEndpoint();
var endpoint = app.GetEndpoint("http");

// This arg resolves to {{- portForServing "exe" -}} in AppArgs at creation time
app.WithArgs("-port")
   .WithArgs(x => x.Args.Add(endpoint.Property(EndpointProperty.TargetPort)));

Fix

  • ResourceSourceViewModel.GetCommandLineInfo: For non-project executables, when EffectiveArgs (DCP-resolved) are available and non-empty, prefer them over AppArgs. Falls back to AppArgs when EffectiveArgs is not yet available (i.e., before the process has started).
  • Tests: Added two cases — effective args preferred over template-containing app args, and app args used as fallback before process starts.

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?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 7k6vsblobprodcus337.vsblob.vsassets.io
    • Triggering command: /usr/share/dotnet/dotnet dotnet build src/Aspire.Dashboard/Aspire.Dashboard.csproj /p:TreatWarningsAsErrors=false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits April 24, 2026 04:37
Copilot AI changed the title [WIP] Fix executable arguments display on dashboard Fix executable Source column showing raw DCP template expressions instead of resolved argument values Apr 24, 2026
Copilot AI requested a review from adamint April 24, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Executable Arguments on dashboard show raw manifest expression

2 participants