Skip to content

Commit

Permalink
Always use expression when referencing endpoint port in environment v…
Browse files Browse the repository at this point in the history
…ariable
  • Loading branch information
ReubenBond committed Apr 3, 2024
1 parent 2bba2ad commit 8417a69
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Aspire.Hosting/ApplicationModel/EndpointReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ public class EndpointReferenceExpression(EndpointReference endpointReference, En

private string? ComputeTargetPort()
{
// We have a target port, so we can return it directly.
if (Endpoint.TargetPort is int port)
{
return port.ToString(CultureInfo.InvariantCulture);
}

// There is no way to resolve the value of the target port until runtime. Even then, replicas make this very complex because
// the target port is not known until the replica is allocated.
// Instead, we return an expression that will be resolved at runtime by the orchestrator.
Expand Down

0 comments on commit 8417a69

Please sign in to comment.