aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.5k stars 407 forks source link

Misleading Doc: On sidecars, the depends_on attributes is not on image attribute #5945

Open alquerci opened 2 weeks ago

alquerci commented 2 weeks ago

Actual

On the doc https://aws.github.io/copilot-cli/docs/developing/sidecars/#image-depends-on

image:
  build: ./Dockerfile
  depends_on:
    nginx: start
    startup: success

image

Expected/Working

sidecars:
  some_sidecar:
    image:
      build: ./Dockerfile
    depends_on:
      nginx: start
      startup: success
Lou1415926 commented 1 week ago

hi @alquerci ! Good eyes - thank you very much for reporting this! While we pick this up, feel free to contribute a PR too! Contributions are always welcomed and very appreciated. It should be removed from https://github.com/aws/copilot-cli/blob/b1c4c42cf1c47793a8181314a732312f3e3df1a7/site/content/docs/include/image-config.en.md?plain=1#L44 and added to https://github.com/aws/copilot-cli/blob/mainline/site/content/docs/include/sidecar-config.en.md.

Thanks again for spotting this!

alquerci commented 1 week ago

@Lou1415926 well it is not so simple.

The template image is good. But it is included inside sidecars template. Only on sidecars depends_on is not present inside image.

It was a good idea to avoid duplication.

So a way to keep avoiding duplication is creating an abstract common image template with same fields used on both concrete image Map.

I accept your invitation to contribute.