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.51k stars 414 forks source link

computeType is not applied to the codeBuild project in pre deployments #5278

Open interu opened 1 year ago

interu commented 1 year ago

Define as follows in copilot/pipelines/xxxx/manifest.yml

build:
  image: aws/codebuild/amazonlinux2-aarch64-standard:3.0

However, generated codeBuild project, EnvironmentType is LINUX_CONTAINER and Image is aws/codebuild/amazonlinux2-x86_64-standard:4.0

I expected ARM_CONTAINER and aws/codebuild/amazonlinux2-aarch64-standard:3.0.

Is the following "Init" func not applied? https://github.com/aws/copilot-cli/blob/mainline/internal/pkg/deploy/pipeline.go#L103-L128

iamhopaul123 commented 1 year ago

Hello @interu. What copilot version are you using? I tried to reproduce the issue using v1.30.1 and it worked as expected for me. Also can you help me verify that you don't have any pipeline override file for this?

interu commented 1 year ago

I tried v1.30.0. Any pipeline override files are not exists. I will retry v1.30.1.

iamhopaul123 commented 1 year ago

Hello @interu. v1.30.0 should be good too. Did you run copilot pipeline deploy to deploy the manifest changes?

interu commented 1 year ago

@iamhopaul123 I run copilot pipeline deploy, but created LINUX_CONTAINER.

Did you check with pre-deployments?

I will investigate the cause some more.

iamhopaul123 commented 1 year ago

Hello @interu.

Did you check with pre-deployments?

So sorry about that! For some reason I missed that it was for pre-deployment. I am able to reproduce the bug now. Working on a fix. Thank you for letting us know! Before our next release (hopefully by the end of the month) you can use pipeline override as a workaround.

Edit: I removed the bug label and replaced with enhancement because the pre-deployment image is not supposed to be controlled by the main build stage's configuration. Right now I think the problem is we only expose buildspec and depends_on.