Skip to content

Remove GitLabIssueTrackerService class

Andy Schoenen requested to merge remove_gitlab_issue_tracker_service into master

What does this MR do?

It removes the GitlabIssueTrackerService class and all references. It does not delete service records with type GitlabIssueTrackerService in the database yet. I thought about adding a migration for this but thought it would be good to do this in a separate step, so we can roll back in case we face problems.

Why?

I'm working on cleaning up the services table (#211785 (closed)). There are 998778 records with type GitlabIssueTrackerService on staging and it is likely that the number on production and self managed instances is also very high.

It looks like GitlabIssueTrackerService is not used anymore. Project returns it as the default_issue_tracker when a project doesn't have an external issue tracker. But in all references, there is another condition that makes sure it is an external issue so GitlabIssueTrackerService is never actually used.

Iterations

We can split up this MR into several iterations:

  1. Tweak IssuesHelper to not use project.issues_tracker for internal issues anymore (!32330 (merged))
  2. Tweak the cross_reference method to not crash in case we use an external issue but there is no issue tracker
  3. Change this to .. || build_gitlab_issue_tracker_service and do GitlabIssueTrackerService.delete_all in a migration (might be dangorouse to remove the GitlabIssueTrackerService class when there are still DB records)
  4. Remove default column and scope (#217581 (closed))
  5. Remove GitlabIssueTrackerService class

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports