aws-cdk
aws-cdk copied to clipboard
aws_codepipeline: Rollbacks for CodePipelines
Describe the feature
AWS introduced Rollbacks for Stages in CodePipeline. This feature currently seems to be missing in CodePipelines.
https://docs.aws.amazon.com/codepipeline/latest/userguide/stage-rollback.html
Use Case
This feature would allow me to enable automatic rollbacks upon failure directly through CDK instead of manually updating the pipeline to rollback the stage upon failure.
Proposed Solution
# pipeline: codepipeline.Pipeline
pipeline.add_stage(
placement=None,
stage_name,
actions=None,
transition_disabled_reason=None,
transition_to_enabled=None,
auto_rollback = True # Boolean that determines if the stage should be rolled back upon failure
)
I think there needs to be changes in the L1 object as well, but I am not well-versed with CDK to know the exact changes.
Other Information
No response
Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
CDK version used
2.140.0
Environment details (OS name and version, etc.)
MacOS Sonoma 14.4.1, Python 3.11.7
I would like to address this issue.
However, the CodePipeline API has this feature, but CloudFormation does not yet. So we are waiting for the CloudFormation property. (However, the user guide already describes the feature on CloudFormation...)
Do we have a timeline on by when CloudFormation will be updated? Otherwise, I am happy to raise an issue with https://github.com/cdklabs/awscdk-service-spec
Hi @jaydm26 ,thanks for requesting this feature. As correctly mentioned by @go-to-k , this is not currently provided by cloudformation. However you could add this feature to Cloudformation coverage roadmap and help in prioritizing this by upvotes.
The property (OnFailure) appears to have been added to CloudFormation and to L1. I will start on my PR.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-stagedeclaration.html
https://github.com/aws/aws-cdk/pull/30182
Can we please have an update on this feature? The PR looks to be abandoned.
Any updates on this?
The PR got abandoned (rolled back) with the comment that we should work on a V2 Pipeline Construct.
https://github.com/aws/aws-cdk/pull/30465#issuecomment-2153270981
However I can't see any public progress or initiative on this. I believe we could start working on that by opening an issue and bundling all related issues there?