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

Make RDSPostgres/Aurora DBSnapshot delete operation Idempotent #1107

Merged
merged 8 commits into from
Oct 1, 2021

Conversation

akankshakumari393
Copy link
Contributor

@akankshakumari393 akankshakumari393 commented Sep 29, 2021

Change Overview

This PR makes the delete operation for RDS DB snapshot Idempotent. It looks for the DB snapshot Not Found error in the case of PostgreSQL or DBClusterSnapshotNotFoundFault in the case of Aurora DBCluster and prints the message in the log.

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • #XXX

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

./build/integration-test.sh RDSPostgreSQLSnap
https://gist.github.com/A-kanksh-a/f56f06825b42c43653b2678bfde324b1

@akankshakumari393 akankshakumari393 changed the title Handle cases if DBsnapshot is already deleted Make RDS Delete DBSnapshot operation Idempotent Sep 29, 2021
@akankshakumari393 akankshakumari393 changed the title Make RDS Delete DBSnapshot operation Idempotent Make RDSPostgres DBSnapshot delete operation Idempotent Sep 29, 2021
default:
return nil, errors.Wrap(err, "Failed to delete snapshot")
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we do this for aurora clusters as well.

@akankshakumari393 akankshakumari393 changed the title Make RDSPostgres DBSnapshot delete operation Idempotent Make RDSPostgres/Aurora DBSnapshot delete operation Idempotent Sep 30, 2021
pkg/function/delete_rds_snapshot.go Outdated Show resolved Hide resolved
pkg/function/delete_rds_snapshot.go Outdated Show resolved Hide resolved
akankshakumari393 and others added 3 commits October 1, 2021 11:50
Co-authored-by: Pavan Navarathna <pavan@kasten.io>
Co-authored-by: Pavan Navarathna <pavan@kasten.io>
@mergify mergify bot merged commit 74bf729 into master Oct 1, 2021
@mergify mergify bot deleted the rds_delete_idempotent branch October 1, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants