microsoft / microsoft/aspire

Docker Compose endpoint summary should tolerate compose CLI compatibility differences

Open
#15,078 1 comment 0 reactions 0 assignees View on GitHub
area-deployment failing-test
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Summary
Docker Compose endpoint summary generation is not compatible with all `docker compose` implementations. In AzDO build `1325767`, `DeployWithDashboard_PrintsDashboardAndServiceEndpoints` failed because the Compose-based endpoint discovery path failed on the agent and the summary fell back to `No public endpoints`.

## Evidence
From AzDO build `1325767`:
- Build results: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1325767&view=results
- `Aspire.Hosting.Docker.Tests.DockerComposeTests.DeployWithDashboard_PrintsDashboardAndServiceEndpoints` failed.
- Actual failure output from `Aspire.Hosting.Docker.Tests_net8.0_x64.log`:

```text
failed Aspire.Hosting.Docker.Tests.DockerComposeTests.DeployWithDashboard_PrintsDashboardAndServiceEndpoints (135ms)
Assert.Contains() Failure: Filter not matched in collection
Collection: ["Successfully deployed **nginx** to Docker Compose "...]

[CreateTask:docker-compose-up-env] Running docker compose up for **env**
[CompleteTask:Running docker compose up for **env**] docker compose up failed with exit code 125 (State: CompletedWithError)
[CompletePublish] (State: ) (Summary: env-dashboard=No public endpoints, nginx=No public endpoints)

docker compose up (stderr): unknown shorthand flag: 'f' in -f
docker compose ps (stderr): unknown shorthand flag: 'f' in -f
docker compose ps failed with exit code 125
```

## Expected behavior
Endpoint summary generation should tolerate Compose CLI differences and still resolve published ports when the primary `compose ps --format json` path is unsupported.

## Notes
A local prototype fix is to fall back to per-service `docker compose port` lookups when the `compose ps` JSON path does not produce endpoints.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.