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
feat(cfn): delete CFN changeset if empty upon request #4101
Conversation
This patch introduces the DeleteCloudFormationChangeSet async operation, so Orca can request to delete a CFN change set under some conditions (e.g. when it's empty, or after the change set has been executed). This will allow full control of the change set life cycle by Spinnaker.
amazonCloudFormation.deleteChangeSet(deleteChangeSetRequest); | ||
} catch (AmazonCloudFormationException e) { | ||
log.error( | ||
"Error removing change set {} on stack {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about including something from the exception in the message to give an idea why it failed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea 🙂 I'll add the message.
@spinnaker/reviewers PTAL |
task.updateStatus(BASE_PHASE, "Deleting CloudFormation ChangeSet"); | ||
amazonCloudFormation.deleteChangeSet(deleteChangeSetRequest); | ||
} catch (AmazonCloudFormationException e) { | ||
log.error( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it OK that this error is ignored?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean not returning any error back to orca? Fair comment, I'll return an error so orca can handle it appropiately, probably with a retryable task 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in c7cd134
...tflix/spinnaker/clouddriver/aws/deploy/ops/DeleteCloudFormationChangeSetAtomicOperation.java
Outdated
Show resolved
Hide resolved
…ver/aws/deploy/ops/DeleteCloudFormationChangeSetAtomicOperation.java Co-Authored-By: Mark Vulfson <markvu@live.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't have much knowledge of CFN, but the code LGTM
This patch introduces the DeleteCloudFormationChangeSet async operation,
so Orca can request to delete a CFN change set under some conditions
(e.g. when it's empty, or after the change set has been executed). This
will allow full control of the change set life cycle by Spinnaker.