Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove confusion in pipelines CodePipeline construct addStage #33011

Open
1 of 2 tasks
mlnrt opened this issue Jan 18, 2025 · 1 comment
Open
1 of 2 tasks

Remove confusion in pipelines CodePipeline construct addStage #33011

mlnrt opened this issue Jan 18, 2025 · 1 comment
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

Comments

@mlnrt
Copy link

mlnrt commented Jan 18, 2025

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:

  • Rename CodePipeline.addStage() to something like CodePipeline.addStackDeploymentStage() or CodePipeline.deployStack()
  • Add a CodePipeline.addStage() which does what the name suggests like aws_codepipeline Pipeline.addStage()
  • Keep addWave() for deploying an application Stack in parallel public 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

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.176.0

Environment details (OS name and version, etc.)

Windows 11

@mlnrt mlnrt added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 18, 2025
@github-actions github-actions bot added the @aws-cdk/aws-codepipeline Related to AWS CodePipeline label Jan 18, 2025
@pahud
Copy link
Contributor

pahud commented Jan 20, 2025

Yes, the "Stage" could be confusing as its not the pipeline stage but the deployment stage.

Thank you for the feedback and we welcome PRs to get it addressed.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants