Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Delete organization fails when vcs is configured #504

Closed
fsaintjacques opened this issue Jul 6, 2023 · 1 comment · Fixed by #518
Closed

Delete organization fails when vcs is configured #504

fsaintjacques opened this issue Jul 6, 2023 · 1 comment · Fixed by #518

Comments

@fsaintjacques
Copy link
Contributor

This is due to a foreign key:

Key (vcs_provider_id)=(...) is still referenced from table "repo_connections".

This probably should be addressed in go as opposed to an SQL cascade as the vcs configuration might require to delete the upstream webhooks.

@leg100
Copy link
Owner

leg100 commented Jul 6, 2023

Seems like introducing an observer pattern / hooks concept would help with this and #506.

leg100 added a commit that referenced this issue Jul 11, 2023
Fixes #504
Fixes #506

Refactors webhook deletion to leverage postgres' cascade functionality.
Doing so means deleting parent resources (organizations, vcs providers)
also deletes webhooks. The deletion triggers the "webhook purger", which
deletes webhooks from the VCS repo provider.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants