Remove GitLabIssueTrackerService class
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:
- Tweak IssuesHelper to not use
project.issues_tracker
for internal issues anymore (!32330 (merged)) - Tweak the cross_reference method to not crash in case we use an external issue but there is no issue tracker
- Change this to
.. || build_gitlab_issue_tracker_service
and doGitlabIssueTrackerService.delete_all
in a migration (might be dangorouse to remove the GitlabIssueTrackerService class when there are still DB records) - Remove default column and scope (#217581 (closed))
- Remove
GitlabIssueTrackerService
class
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry - [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
- [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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