Remove confusion in pipelines CodePipeline construct addStage #33011
Labels
@aws-cdk/aws-codepipeline
Related to AWS CodePipeline
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
As per this CDK discussion it is still very confusing for a lot of people that
CodePipeline.addStage()
is not to add a stage in a pipeline but to deploy an application Stack.There is a workaround using
CodePipeline.addWave()
but this is also confusing since a Wave is normally for parallel deployment in different regions.These methods should be changed and the
CodePipeline.addStage()
method reserved to, well, add a Stage.Use Case
This would help avoid confusion when developing and also reading the code. This feels like unnecessary cognitive load.
Proposed Solution
The request is as follow:
CodePipeline.addStage()
to something likeCodePipeline.addStackDeploymentStage()
orCodePipeline.deployStack()
CodePipeline.addStage()
which does what the name suggests like aws_codepipelinePipeline.addStage()
addWave()
for deploying an application Stack in parallelpublic addWave(stages: Stage[], options?: WaveOptions): Wave
Other Information
With the above proposed solution, this would however mean that
CodePipeline.addStage()
would behave differently, so people updating their CDK version without updating their code would face issues.Acknowledgements
CDK version used
2.176.0
Environment details (OS name and version, etc.)
Windows 11
The text was updated successfully, but these errors were encountered: