docker compose up (in ECS context) fails silently when a malformed compose file is detected #2068
Description
I am using the ECS / Compose integration and it seems there have been a regression in how compose file errors are being handled.
I am using Docker Desktop 4.0 and this is the docker
version:
➜ Downloads docker version
Client:
Cloud integration: 1.0.17
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:55:20 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:10 2021
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0
➜ Downloads
If you try to edit a malformed docker-compose.yaml
file as in:
services:
web:
image: nginx:latest
ports: 80:80
The docker binary in the default (local) context will complain (rightly so):
➜ Downloads docker compose up -d
services.web.ports must be a list
➜ Downloads
However, if you move to the ecs context and try to up the same file it will just fail silently:
➜ Downloads docker context use myecscontext
myecscontext
➜ Downloads docker compose up
➜ Downloads
➜ Downloads docker compose convert
➜ Downloads
Nothing happens. No error message, anything.
If you fix the typo in the compose file the file is interpreted and brought up just fine in both contexts.
I am fairly sure I got compose files "wrong" in the past and there were always an indication of a problem in the ECS context. I have never seen it failing silently like this (IIRC). Even if this is how it's always been working a proper handling of error messages would be required.