Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ public AzureContainerAppResource(string name, Action<AzureResourceInfrastructure
var endpoint = $"https://{targetResource.Name.ToLowerInvariant()}.{domainValue}";

ctx.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{targetResource.Name}** to [{endpoint}]({endpoint})", enableMarkdown: true);
ctx.Summary.Add(targetResource.Name, endpoint);
}
else
{
ctx.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{targetResource.Name}** to Azure Container Apps environment **{containerAppEnv.Name}**. No public endpoints were configured.", enableMarkdown: true);
ctx.Summary.Add(targetResource.Name, "No public endpoints");
Comment on lines 50 to +62

Copilot AI Feb 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domainValue is fetched even when anyPublicEndpoints is false, but it’s only needed to build the public URL. Consider moving ContainerAppDomain.GetValueAsync(...) inside the if (anyPublicEndpoints) branch to avoid unnecessary async work.

Copilot uses AI. Check for mistakes.
}
},
Tags = ["print-summary"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public AzureAppServiceWebSiteResource(string name, Action<AzureResourceInfrastru
endpoints = [];
}

var anyPublicEndpoints = endpoints.Any(e => e.IsExternal);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this too early to check this? Can endpoints be added / changed between here and when the step runs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I didn't think AppService supports non external endpoints? But maybe that was temporary.


var printResourceSummary = new PipelineStep
{
Name = $"print-{targetResource.Name}-summary",
Expand All @@ -61,8 +63,18 @@ public AzureAppServiceWebSiteResource(string name, Action<AzureResourceInfrastru
}

var hostName = await GetAppServiceWebsiteNameAsync(ctx, deploymentSlot).ConfigureAwait(false);
var endpoint = $"https://{hostName}.azurewebsites.net";
ctx.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{targetResource.Name}** to [{endpoint}]({endpoint})", enableMarkdown: true);

if (anyPublicEndpoints)
{
var endpoint = $"https://{hostName}.azurewebsites.net";
ctx.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{targetResource.Name}** to [{endpoint}]({endpoint})", enableMarkdown: true);
ctx.Summary.Add(targetResource.Name, endpoint);
}
else
{
ctx.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{targetResource.Name}** to Azure App Service environment **{computerEnv.Name}**. No public endpoints were configured.", enableMarkdown: true);
ctx.Summary.Add(targetResource.Name, "No public endpoints");

Copilot AI Feb 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hostName is computed even when anyPublicEndpoints is false, but the else-branch doesn’t use it. This can trigger unnecessary async parameter/value resolution; move the GetAppServiceWebsiteNameAsync call inside the if (anyPublicEndpoints) branch.

Copilot uses AI. Check for mistakes.
}
},
Tags = ["print-summary"],
RequiredBySteps = [WellKnownPipelineSteps.Deploy]
Expand Down
3 changes: 3 additions & 0 deletions src/Aspire.Hosting.Docker/DockerComposeServiceResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ private async Task PrintEndpointsAsync(PipelineStepContext context, DockerCompos
context.ReportingStep.Log(LogLevel.Information,
$"Successfully deployed **{TargetResource.Name}** to Docker Compose environment **{environment.Name}**. No public endpoints were configured.",
enableMarkdown: true);
context.Summary.Add(TargetResource.Name, "No public endpoints");
return;
}

Expand All @@ -346,13 +347,15 @@ private async Task PrintEndpointsAsync(PipelineStepContext context, DockerCompos
{
var endpointList = string.Join(", ", endpoints.Select(e => $"[{e}]({e})"));
context.ReportingStep.Log(LogLevel.Information, $"Successfully deployed **{TargetResource.Name}** to {endpointList}.", enableMarkdown: true);
context.Summary.Add(TargetResource.Name, string.Join(", ", endpoints));
Comment on lines 348 to +350

Copilot AI Feb 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endpoints is a HashSet<string>, so joining it directly can produce non-deterministic ordering in the log/summary output. Consider ordering the endpoints (e.g., sort) before formatting so the deployment summary is stable and easier to scan/compare.

Copilot uses AI. Check for mistakes.
}
else
{
// No published ports found in docker compose ps output.
context.ReportingStep.Log(LogLevel.Information,
$"Successfully deployed **{TargetResource.Name}** to Docker Compose environment **{environment.Name}**.",
enableMarkdown: true);
context.Summary.Add(TargetResource.Name, "No public endpoints");

Copilot AI Feb 6, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch is hit when external endpoints were configured but no published ports were found/parsed from docker compose ps output. Adding "No public endpoints" to the pipeline summary here is misleading; consider using a value that reflects the actual condition (e.g., endpoints unavailable / no published ports detected) instead of implying none were configured.

Suggested change
context.Summary.Add(TargetResource.Name, "No public endpoints");
context.Summary.Add(TargetResource.Name, "Endpoints unavailable (no published ports detected)");

Copilot uses AI. Check for mistakes.
}
}

Expand Down
Loading