Skip to content

Fix executable arguments showing raw manifest expressions in dashboard #10896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 10, 2025

After upgrading to Aspire 9.2, executable resources started showing raw manifest expressions like {{- portForServing "exe" -}} instead of resolved values in the dashboard's Source column when using endpoint references in arguments.

The issue was in the ExpressionResolver class which only handled endpoint expressions when the source was a container (sourceIsContainer = true). For executable resources, endpoint expressions would fall through to the generic IValueProvider case and return unresolved template expressions.

Before the fix:

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

app.WithArgs("-port")
    .WithArgs(x => x.Args.Add(endpoint.Property(EndpointProperty.TargetPort)));
// Dashboard would show: {{- portForServing "exe" -}}

After the fix:

// Same code now shows the resolved port number: 12345

The fix removes the when sourceIsContainer condition from the endpoint expression handlers in ExpressionResolver.ResolveInternalAsync(), allowing endpoint expressions to be properly resolved for both container and executable sources. The existing EvalEndpointAsync method already contains the correct logic to handle different communication scenarios (container-to-container, executable-to-container, etc.).

Fixes #9047.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Executable Arguments on dashboard show raw manifest expression Fix executable arguments showing raw manifest expressions in dashboard Aug 10, 2025
@Copilot Copilot AI requested a review from davidfowl August 10, 2025 03:36
Copilot finished work on behalf of davidfowl August 10, 2025 03:36
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