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

feat: Add infra for cleaning up providers when deleted #2871

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

skynetigor
Copy link

@skynetigor skynetigor commented Dec 18, 2024

Closes #392

📑 Description

Added base functionality for cleaning up provider leftovers when it's deleted in Keep.
Now base provider has clean_up function that each inheritor can override in order to implement its own clean up logic. The function is called during provider deletion.

Add cleaning up webhooks for PagerDuty provider.

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

ℹ Additional Information

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
keep ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 8:10am

@CLAassistant
Copy link

CLAassistant commented Dec 18, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ skynetigor
❌ Ihor Panasiuk


Ihor Panasiuk seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

)
except Exception as exc:
logger.exception(msg="Failed to clean up provider",
extra={ "error_msg": str(exc) })
Copy link
Member

Choose a reason for hiding this comment

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

Nice PR! actually logger.exception already logs the exception itself alone so no need for that extra param!

Copy link
Author

Choose a reason for hiding this comment

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

Nice!
I'll fix,

Copy link
Author

Choose a reason for hiding this comment

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

Fixed :)

@skynetigor skynetigor marked this pull request as ready for review December 18, 2024 16:14
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A new feature Provider Providers related issues size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleting a provider does not clean up the changes on the infrastructure
3 participants