amazon-ecs-cli icon indicating copy to clipboard operation
amazon-ecs-cli copied to clipboard

Spurious "unsupported YAML option" for not-present keys

Open garthk opened this issue 9 years ago • 6 comments

ecs-cli warns me that it's skipping an unsupported YAML option (name=networks), but the string networks does not appear in my docker-compose.yml:

$ ecs-cli compose service up
WARN[0000] Skipping unsupported YAML option...           option name=networks
WARN[0000] Skipping unsupported YAML option for service...  option name=networks service name=loader
$ grep networks docker-compose.yml  | wc -l
       0

You can see the same warning pasted over and over into various issues.

garthk avatar Apr 26 '17 00:04 garthk

This is because libcompose added a default network config. https://github.com/docker/libcompose/blob/master/project/project.go#L286

yinshiua avatar Apr 28 '17 00:04 yinshiua

So does ecs support the networks / expose option now?

hustshawn avatar Aug 24 '17 10:08 hustshawn

Support for network_mode is being actively developed.

Related to https://github.com/aws/amazon-ecs-cli/issues/267 and https://github.com/aws/amazon-ecs-cli/issues/153.

We can also look into suppressing the warning to avoid confusion about how the network field is being treated.

SoManyHs avatar Sep 12 '17 22:09 SoManyHs

Also reported in #345.

SoManyHs avatar Oct 25 '17 17:10 SoManyHs

Is there a workaround?

trahloff avatar Jan 09 '18 09:01 trahloff

For what it's worth, I also see this for the "volumes" directive at the root level of a docker-compose file.

A simple docker-compose file with this format:

version: '2'
services:
    service1:
        image: XXX
        volumes:
            - test_volume:/opt/source/source_files
    service2:
        image: YYY
        volumes: 
            - test_volume:/source_files
volumes:
    test_volume:

This yields the following warning, even though when I look at the resulting task definition JSON, it looks like it successfully created the named volume "test_volume".

time="2018-01-24T22:14:11Z" level=warning msg="Skipping unsupported YAML option..." option name=volumes

timwah avatar Jan 24 '18 22:01 timwah