aws-deployment-framework icon indicating copy to clipboard operation
aws-deployment-framework copied to clipboard

Proposal for introducing wave concept to pipeline targets.

Open StewartW opened this issue 4 years ago • 0 comments

What and Why

This is partly inspired by: https://aws.amazon.com/builders-library/automating-safe-hands-off-deployments But also working towards a solution to Issue #250

The proposal is that we add the concept of a "Wave" to each stage. In the default ADF pipeline, this would be Stage actions that have the same run order, and so happen in parallel.

Each "Wave" would happen in sequential order. allowing for some more control over what a deployment looks like.

Whilst it doesn't solve #250 straight away (The sequential / parallel limit is still 50 actions per stage) combining this with #285 would allow for the creation of some new pipeline types that could leverage integrations with CodePipeline.

How?

I'm proposing that we add a new property to the target schema definition for max_wave_size this would default if not set to the current parallel action of 50. (This ensures that there's no backwards compatibility issues and that existing pipelines aren't changed unintentionally)

This max wave size would then be set on the TargetStructure class and exposed as a property wave_size

Inside generate_pipelines_input, we would batch up the target_structure.account_list based on the wave size and set this into the pipeline template dictionary.

Inside the cdk_stack for generating the pipeline we would continue to process targets as normal however with one exception. Instead of targets being a list of targets. It will become a list of a list of targets. [[12345678910],[12345678911]] rather than the current [12345678910. 12345678911]

The same assumptions can be made that any properties defined for the first target in a wave also applies to the rest of the wave.

TL;DR

A significant change to how we format pipeline targets from the deployment map definition, that will not impact the current default pipeline, but will allow for more customisable custom pipeline types going forward.

StewartW avatar Sep 26 '20 09:09 StewartW