Add PG trigger for has_external_issue_tracker
We cache whether a project has an External Issue Tracker integration enabled in the `has_external_issue_tracker` column on `projects`. It will be `TRUE` if the project has any integration (a record in `services`) with a category of "issue_tracker" enabled. This was previously maintained with application code. This cache is easy to fall out of consistency when we fail to maintain it during bulk operations (including PostgreSQL cascading deletes https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48163/) as mentioned in: - https://gitlab.com/gitlab-org/gitlab/-/issues/273574#note_457006686 - https://gitlab.com/gitlab-org/gitlab/-/issues/289798 As Ecosystem is increasingly changing integration data using bulk operations this has been changed to be maintained through a PostgreSQL trigger. https://gitlab.com/gitlab-org/gitlab/-/issues/290715 https://gitlab.com/gitlab-org/gitlab/-/issues/289798
Showing
Please register or sign in to comment