aws / aws/aws-cdk

aws_codepipeline: Rollbacks for CodePipelines

Open
#30,083 7 comments 6 reactions 0 assignees View on GitHub
@aws-cdk/aws-codepipeline effort/medium feature-request needs-cfn p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### 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

```python
# 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

Contributor guide

Open the contributing guide

Research direction

Start with the CodePipeline Pipeline.add_stage API and the L1 object mentioned in the issue, then read AWS's stage rollback documentation to understand the required setting. Done means CDK can configure automatic rollback for a pipeline stage, including the corresponding L1 support; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.