-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(pipelines): Allow re-generating CloudFormation changeset after failure #11995
Comments
Is it possible that this is only an issue with the initial deploy of the stack? Potentially similar to this: #901? |
I also just found this command to re-trigger a pipeline from the CLI - maybe it's just not exposed via the UI?
Perhaps this is a good workaround. |
I would agree that a better solution would be to petition to fix the root cause, rather than try to work around it. There should be a button at the top-right of your pipeline though that says "Release Change", which does the same as starting the execution using the CLI. Not actionable for CDK. Closing. |
|
This is available through the UI by clicking the "Release change" button. |
This is still a problem. If you have a large pipeline, "releasing a change" would require deploying through all the previous stages before you can retry the failed stage. Is there a creative workaround by which we can "replay" a changeset with the same name ( |
Indeed, we also have a large CDK deployment and this forces us to build everything again and again. Any workaround? |
Hi, a workaround for this is to actually disable change sets. They are auto enabled but based on https://github.com/aws/aws-cdk/pull/21619/files you should be able to remove them. I have had success with this and can now retry my stages. Hope this helps. |
As of today, I couldn't find a way to re-run an application stage deployment if application of the CloudFormation changeset failed. We can kick off the pipeline again by committing a dummy/no-op commit to the repository, but this creates unnecessary cruft in the SCM history.
Use Case
Consider a CloudFormation template that could not apply for some reason. In my case, it was because of a naming conflict with another CloudFormation stack that needed to be destroyed.
The CodePipeline user interface looks like this after the failure:
So, I took a look at the failure and noticed the naming conflict. I went and destroyed the other CDK stack and wanted to re-run the deployment. However, when I clicked the "Retry" button in the UI, the "Deploy" stage failed with this error message:
Indeed, in the CloudFormation user interface, the changeset was not present:
The problem appears to be because there's no way to retry an entire stage in CodePipeline, including steps that previously succeeded. According to the
aws cli
docs (aws codepipeline retry-stage-execution help
):Because I didn't have a way to rerun the
.Prepare
step (which produces the changeset), I was kind of stuck and had to revert to pushing a no-op commit to force the step to re-run.Proposed Solution
Since this appears to be a CodePipeline limitation, maybe a custom "step" is needed? Like maybe an SNS topic or something to kick off the deployment again? Or maybe a better solution would be to +1 feature requests on the CodePipeline side to allow "Retry (including succeeded)" behavior?
Other
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: