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.48k stars 400 forks source link

Update CodeCommit source for Pipelines to be event-driven rather than polling #4410

Open efekarakus opened 1 year ago

efekarakus commented 1 year ago

Ask

Today, the CodeCommit source for CodePipeline pipelines default to a polling behavior with copilot pipeline init (rather than event-driven and push).

Initially, only polling was supported. Events are now the default and recommended way to start your pipeline when there’s a code change. https://docs.aws.amazon.com/codepipeline/latest/userguide/update-change-detection.html#update-change-detection-cli-codecommit

Copilot should instead switch over to the more reactive and frugal option of event-driven triggers.

CodePipeline provides a nice step-by-step walkthrough of the changes that needs to be made as well: https://docs.aws.amazon.com/codepipeline/latest/userguide/update-change-detection.html#update-change-detection-cfn

Original request

https://gitter.im/aws/copilot-cli?at=63d06167c2911455433397a0

mlipiec commented 10 months ago

I'm bringing up the topic again :)

tomasged commented 3 months ago

Please, this one is really needed.

After letting copilot deploy the pipelines, we setup the pipelines for events, but every time we do a copilot pipeline deploy to update them (for example, after adding a job), the pipeline is setup for polling again but the event rule in event bridge is not removed, so we suffer of duplicated executions of pipelines constantly.

Given that eventing for pipelines is the recommendation from AWS, this should be made into copilot since it's supposed to encode all current best practices from AWS.