Skip to content

Create a script to help reconcile and clean up all Gitlab::QueryLimiting.disable references with corresponding issues

Chad Woolley requested to merge 325640-query-limiting-report-script into master

What does this MR do?

Prints a report which helps reconcile occurrences of the QueryLimiting.disable(ISSUE_LINK) allowlist block against the corresponding open issues.

If everything is consistent, the script should ideally not report any issues or code lines, other than possibly remaining "calls with no issue number" which use variables/etc.

Tasks

  • Create an automated reporting script which can help reconcile the open issues to the code occurrences.
  • Update all code occurrences of Gitlab::QueryLimiting.disable!(ISSUE_LINK) to point to a valid, opened issue.

Logic of script

    # Read all issues matching criteria and extract array of issue numbers
    # Find all code references and extract issue numbers
    # Print list of all issues without code references
    # Print list of all code references issue numbers that don't have search label
    # Print list of all code references with no issue numbers (i.e. dynamic or variable argument)

Output from script

NOTE: This is the original output prior to updating of issue links and applying some missing labels.

Script output:
/bin/zsh -c "bash -c '. /Users/cwoolley/.asdf/asdf.sh && asdf shell ruby 2.7.2 && ruby /Users/cwoolley/workspace/gitlab-development-kit/gitlab/scripts/perf/query_limiting_report.rb --api-token XXXXXX'"
Finding issues by label querylimiting-disable...
Finding code lines...


REPORT:


Found 189 total issues with 'querylimiting-disable' search label, 148 are still opened...


Found 42 total occurrences of 'QueryLimiting.disable' in code...

--------------------------------------------------------------------------------


Issues without any 'QueryLimiting.disable' code references (142 total):
[{:iid=>325691,
  :state=>"opened",
  :title=>
   "Projects::MergeRequests::DiffsController#diff_for_path.json executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/325691"},
 {:iid=>325690,
  :state=>"opened",
  :title=>
   "PUT /api/projects/:id/merge_requests/:noteable_id/notes/:note_id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/325690"},
 {:iid=>325689,
  :state=>"opened",
  :title=>
   "DELETE /api/projects/:id/merge_requests/:merge_request_iid executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/325689"},
 {:iid=>325685,
  :state=>"opened",
  :title=>
   "/api/:version/projects/:id/merge_requests/:merge_request_iid/add_spent_time executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/325685"},
 {:iid=>325682,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequestsController#destroy executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/325682"},
 {:iid=>29418,
  :state=>"opened",
  :title=>
   "Too many SQL queries were executed in Admin::ApplicationSettingsController#usage_data",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/29418"},
 {:iid=>23147,
  :state=>"opened",
  :title=>
   "Controller Import::ManifestController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/23147"},
 {:iid=>22226,
  :state=>"opened",
  :title=>
   "API endpoints DELETE /groups/:id and /v3/groups/:id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/22226"},
 {:iid=>21146,
  :state=>"opened",
  :title=>
   "API PUT /projects/:id/merge_requests/:merge_request_iid/merge executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21146"},
 {:iid=>21144,
  :state=>"opened",
  :title=>
   "API PUT /projects/:id/merge_requests/:merge_request_id/merge executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21144"},
 {:iid=>21143,
  :state=>"opened",
  :title=>
   "API PUT /projects/:id/issues/:issue_iid executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21143"},
 {:iid=>21142,
  :state=>"opened",
  :title=>
   "API PUT /projects/:id/issues/:issue_id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21142"},
 {:iid=>21140,
  :state=>"opened",
  :title=>"API POST /projects/:id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21140"},
 {:iid=>21138,
  :state=>"opened",
  :title=>"API POST /jobs/request executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21138"},
 {:iid=>21137,
  :state=>"opened",
  :title=>"API POST /jobs/:id/artifacts executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21137"},
 {:iid=>21136,
  :state=>"opened",
  :title=>"API POST /internal/allowed executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21136"},
 {:iid=>21135,
  :state=>"opened",
  :title=>"API GET /users/:namespace/repos executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21135"},
 {:iid=>21134,
  :state=>"opened",
  :title=>"API GET /runners/:id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21134"},
 {:iid=>21133,
  :state=>"opened",
  :title=>"API GET /projects/owned executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21133"},
 {:iid=>21132,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/repository/tags executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21132"},
 {:iid=>21131,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/repository/commits/:sha/comments executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21131"},
 {:iid=>21130,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/repository/commits/:sha/builds executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21130"},
 {:iid=>21129,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/milestones/:milestone_id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21129"},
 {:iid=>21126,
  :state=>"opened",
  :title=>"API GET /projects/:id/labels executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21126"},
 {:iid=>21125,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/issues/:noteable_id/notes executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21125"},
 {:iid=>21124,
  :state=>"opened",
  :title=>
   "API GET /projects/:id/issues/:issue_iid executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21124"},
 {:iid=>21123,
  :state=>"opened",
  :title=>"API GET /projects/:id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21123"},
 {:iid=>21122,
  :state=>"opened",
  :title=>"API GET /projects/:id/events executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21122"},
 {:iid=>21121,
  :state=>"opened",
  :title=>"API GET /projects executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21121"},
 {:iid=>21120,
  :state=>"opened",
  :title=>"API GET /issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21120"},
 {:iid=>21119,
  :state=>"opened",
  :title=>
   "API GET /groups/:id/milestones/:milestone_id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21119"},
 {:iid=>21118,
  :state=>"opened",
  :title=>"API GET /groups/:id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21118"},
 {:iid=>21117,
  :state=>"opened",
  :title=>"API GET /groups/:id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21117"},
 {:iid=>21116,
  :state=>"opened",
  :title=>"API GET /groups executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21116"},
 {:iid=>21115,
  :state=>"opened",
  :title=>
   "Controller UsersController#groups executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21115"},
 {:iid=>21114,
  :state=>"opened",
  :title=>
   "Controller UsersController#calendar_activities executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21114"},
 {:iid=>21113,
  :state=>"opened",
  :title=>
   "Controller SearchController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21113"},
 {:iid=>21112,
  :state=>"opened",
  :title=>
   "Controller Projects::WikisController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21112"},
 {:iid=>21111,
  :state=>"opened",
  :title=>
   "Controller Projects::WikisController#preview_markdown executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21111"},
 {:iid=>21110,
  :state=>"opened",
  :title=>
   "Controller Projects::VariablesController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21110"},
 {:iid=>21109,
  :state=>"opened",
  :title=>
   "Controller Projects::TreeController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21109"},
 {:iid=>21108,
  :state=>"opened",
  :title=>
   "Controller Projects::TagsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21108"},
 {:iid=>21107,
  :state=>"opened",
  :title=>
   "Controller Projects::Settings::CiCdController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21107"},
 {:iid=>21106,
  :state=>"opened",
  :title=>
   "Controller Projects::ProjectMembersController#leave executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21106"},
 {:iid=>21105,
  :state=>"opened",
  :title=>
   "Controller Projects::ProjectMembersController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21105"},
 {:iid=>21104,
  :state=>"opened",
  :title=>
   "Controller Projects::ProjectMembersController#destroy executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21104"},
 {:iid=>21103,
  :state=>"opened",
  :title=>
   "Controller Projects::ProjectMembersController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21103"},
 {:iid=>21102,
  :state=>"opened",
  :title=>
   "Controller Projects::ProjectMembersController#apply_import executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21102"},
 {:iid=>21101,
  :state=>"opened",
  :title=>
   "Controller Projects::PipelinesController#retry executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21101"},
 {:iid=>21100,
  :state=>"opened",
  :title=>
   "Controller Projects::PipelinesController#failures executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21100"},
 {:iid=>21098,
  :state=>"opened",
  :title=>
   "Controller Projects::PipelinesController#cancel executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21098"},
 {:iid=>21097,
  :state=>"opened",
  :title=>
   "Controller Projects::NotesController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21097"},
 {:iid=>21096,
  :state=>"opened",
  :title=>
   "Controller Projects::NotesController#resolve executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21096"},
 {:iid=>21095,
  :state=>"opened",
  :title=>
   "Controller Projects::NotesController#create.json executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21095"},
 {:iid=>21093,
  :state=>"opened",
  :title=>
   "Controller Projects::MilestonesController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21093"},
 {:iid=>21092,
  :state=>"opened",
  :title=>
   "Controller Projects::MilestonesController#merge_requests executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21092"},
 {:iid=>21091,
  :state=>"opened",
  :title=>
   "Controller Projects::MilestonesController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21091"},
 {:iid=>21090,
  :state=>"opened",
  :title=>
   "Controller Projects::MilestonesController#destroy executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21090"},
 {:iid=>21088,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequests::CreationsController#pipelines executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21088"},
 {:iid=>21086,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequests::CreationsController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21086"},
 {:iid=>21083,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequestsController#remove_wip executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21083"},
 {:iid=>21082,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequestsController#pipelines executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21082"},
 {:iid=>21078,
  :state=>"opened",
  :title=>
   "Controller Projects::LabelsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21078"},
 {:iid=>21077,
  :state=>"opened",
  :title=>
   "Controller Projects::LabelsController#destroy executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21077"},
 {:iid=>21076,
  :state=>"opened",
  :title=>
   "Controller Projects::JobsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21076"},
 {:iid=>21075,
  :state=>"opened",
  :title=>
   "Controller Projects::JobsController#retry executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21075"},
 {:iid=>21074,
  :state=>"opened",
  :title=>
   "Controller Projects::JobsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21074"},
 {:iid=>21073,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21073"},
 {:iid=>21072,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#move executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21072"},
 {:iid=>21071,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#create_merge_request executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21071"},
 {:iid=>21070,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21070"},
 {:iid=>21069,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#can_create_branch executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21069"},
 {:iid=>21068,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#bulk_update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21068"},
 {:iid=>21067,
  :state=>"opened",
  :title=>
   "Controller Projects::IssueLinksController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21067"},
 {:iid=>21066,
  :state=>"opened",
  :title=>
   "Controller Projects::ForksController#new executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21066"},
 {:iid=>21065,
  :state=>"opened",
  :title=>
   "Controller Projects::ForksController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21065"},
 {:iid=>21064,
  :state=>"opened",
  :title=>
   "Controller Projects::ForksController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21064"},
 {:iid=>21063,
  :state=>"opened",
  :title=>
   "Controller Projects::EnvironmentsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21063"},
 {:iid=>21062,
  :state=>"opened",
  :title=>
   "Controller Projects::EnvironmentsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21062"},
 {:iid=>21061,
  :state=>"opened",
  :title=>
   "Controller Projects::EnvironmentsController#folder executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21061"},
 {:iid=>21060,
  :state=>"opened",
  :title=>
   "Controller Projects::DiscussionsController#resolve executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21060"},
 {:iid=>21058,
  :state=>"opened",
  :title=>
   "Controller Projects::CycleAnalytics::EventsController#test executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21058"},
 {:iid=>21057,
  :state=>"opened",
  :title=>
   "Controller Projects::CycleAnalytics::EventsController#staging executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21057"},
 {:iid=>21056,
  :state=>"opened",
  :title=>
   "Controller ProjectsController#transfer executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21056"},
 {:iid=>21055,
  :state=>"opened",
  :title=>
   "Controller ProjectsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21055"},
 {:iid=>21054,
  :state=>"opened",
  :title=>
   "Controller ProjectsController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21054"},
 {:iid=>21053,
  :state=>"opened",
  :title=>
   "Controller ProjectsController#activity executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21053"},
 {:iid=>21052,
  :state=>"opened",
  :title=>
   "Controller Projects::CompareController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21052"},
 {:iid=>21051,
  :state=>"opened",
  :title=>
   "Controller Projects::CommitsController#signatures executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21051"},
 {:iid=>21050,
  :state=>"opened",
  :title=>
   "Controller Projects::CommitsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21050"},
 {:iid=>21048,
  :state=>"opened",
  :title=>
   "Controller Projects::CommitController#pipelines executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21048"},
 {:iid=>21047,
  :state=>"opened",
  :title=>
   "Controller Projects::BranchesController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21047"},
 {:iid=>21046,
  :state=>"opened",
  :title=>
   "Controller Projects::BlobController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21046"},
 {:iid=>21044,
  :state=>"opened",
  :title=>
   "Controller Profiles::SlacksController#edit executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21044"},
 {:iid=>21043,
  :state=>"opened",
  :title=>
   "Controller Profiles::NotificationsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21043"},
 {:iid=>21042,
  :state=>"opened",
  :title=>
   "Controller ProfilesController#update_username executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21042"},
 {:iid=>21041,
  :state=>"opened",
  :title=>
   "Controller Import::GitlabProjectsController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21041"},
 {:iid=>21040,
  :state=>"opened",
  :title=>
   "Controller Import::GithubController#status executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21040"},
 {:iid=>21039,
  :state=>"opened",
  :title=>
   "Controller Import::GithubController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21039"},
 {:iid=>21038,
  :state=>"opened",
  :title=>
   "Controller Import::BitbucketController#status executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21038"},
 {:iid=>21037,
  :state=>"opened",
  :title=>
   "Controller Import::BitbucketController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21037"},
 {:iid=>21036,
  :state=>"opened",
  :title=>
   "Controller Groups::MilestonesController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21036"},
 {:iid=>21035,
  :state=>"opened",
  :title=>
   "Controller Groups::MilestonesController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21035"},
 {:iid=>21034,
  :state=>"opened",
  :title=>
   "Controller Groups::LabelsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21034"},
 {:iid=>21033,
  :state=>"opened",
  :title=>
   "Controller Groups::GroupMembersController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21033"},
 {:iid=>21032,
  :state=>"opened",
  :title=>
   "Controller Groups::GroupMembersController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21032"},
 {:iid=>21031,
  :state=>"opened",
  :title=>
   "Controller Groups::EpicIssuesController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21031"},
 {:iid=>21030,
  :state=>"opened",
  :title=>
   "Controller GroupsController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21030"},
 {:iid=>21029,
  :state=>"opened",
  :title=>
   "Controller GroupsController#transfer executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21029"},
 {:iid=>21028,
  :state=>"opened",
  :title=>
   "Controller GroupsController#activity executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21028"},
 {:iid=>21027,
  :state=>"opened",
  :title=>
   "Controller Groups::ChildrenController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21027"},
 {:iid=>21026,
  :state=>"opened",
  :title=>
   "Controller Groups::AnalyticsController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21026"},
 {:iid=>21024,
  :state=>"opened",
  :title=>
   "Controller Explore::ProjectsController#trending executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21024"},
 {:iid=>21023,
  :state=>"opened",
  :title=>
   "Controller Dashboard::ProjectsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21023"},
 {:iid=>21022,
  :state=>"opened",
  :title=>
   "Controller Dashboard::MilestonesController#show executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21022"},
 {:iid=>21021,
  :state=>"opened",
  :title=>
   "Controller Dashboard::MilestonesController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21021"},
 {:iid=>21020,
  :state=>"opened",
  :title=>
   "Controller Dashboard::GroupsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21020"},
 {:iid=>21019,
  :state=>"opened",
  :title=>
   "Controller DashboardController#activity executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21019"},
 {:iid=>21018,
  :state=>"opened",
  :title=>
   "Controller Boards::ListsController#index executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21018"},
 {:iid=>21017,
  :state=>"opened",
  :title=>
   "Controller Boards::IssuesController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/21017"},
 {:iid=>4796,
  :state=>"opened",
  :title=>
   "API endpoint PUT /v4/projects/:id/merge_requests/:merge_request_id/merge executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/4796"},
 {:iid=>4795,
  :state=>"opened",
  :title=>"API endpoint DELETE /groups/:id executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/4795"},
 {:iid=>20827,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequestsController#update executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20827"},
 {:iid=>20824,
  :state=>"opened",
  :title=>
   "Controller Projects::MergeRequestsController#assign_related_issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20824"},
 {:iid=>20823,
  :state=>"opened",
  :title=>
   "Controller  Import::GitlabProjectsController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20823"},
 {:iid=>20816,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#move executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20816"},
 {:iid=>20815,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#create_merge_request executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20815"},
 {:iid=>20814,
  :state=>"opened",
  :title=>
   "Controller Projects::IssuesController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20814"},
 {:iid=>20800,
  :state=>"opened",
  :title=>
   "Controller Projects::NotesController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20800"},
 {:iid=>20798,
  :state=>"opened",
  :title=>
   "Controller RegistrationsController#destroy executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20798"},
 {:iid=>20785,
  :state=>"opened",
  :title=>
   "Controller Projects::PipelinesController#retry executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20785"},
 {:iid=>20784,
  :state=>"opened",
  :title=>
   "Controller Projects::PipelinesController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20784"},
 {:iid=>20783,
  :state=>"opened",
  :title=>
   "Controller Projects::ForksController#create executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20783"},
 {:iid=>20780,
  :state=>"opened",
  :title=>
   "Controller Projects::CommitsController executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20780"},
 {:iid=>20776,
  :state=>"opened",
  :title=>
   "API endpoint POST /projects/:id/issues/:issue_iid/move executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20776"},
 {:iid=>20775,
  :state=>"opened",
  :title=>
   "API endpoint PUT /projects/:id/issues/:issue_iid executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20775"},
 {:iid=>20773,
  :state=>"opened",
  :title=>
   "API endpoint POST /projects/:id/issues executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20773"},
 {:iid=>20772,
  :state=>"opened",
  :title=>
   "API endpoint PUT /projects/:id/merge_requests/:merge_request_iid executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20772"},
 {:iid=>20770,
  :state=>"opened",
  :title=>
   "API endpoint POST /projects/:id/merge_requests executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20770"},
 {:iid=>20759,
  :state=>"opened",
  :title=>
   "API endpoint POST /projects/:id/fork executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20759"},
 {:iid=>20758,
  :state=>"opened",
  :title=>
   "API endpoint POST /projects/:project_id/trigger/pipeline executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20758"},
 {:iid=>20711,
  :state=>"opened",
  :title=>
   "API endpoint /projects/:id/pipeline executes more than 100 SQL queries",
  :issue_url=>"https://gitlab.com/gitlab-org/gitlab/issues/20711"}]

--------------------------------------------------------------------------------


'QueryLimiting.disable' calls with references to an issue which doesn't have 'querylimiting-disable' search label (33 total):
[{:file_location=>
   "app/controllers/admin/application_settings_controller.rb:194",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/63107')",
  :issue_number=>63107,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/import/gitlab_projects_controller.rb:46",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437')",
  :issue_number=>42437,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/import/manifest_controller.rb:119",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/48939')",
  :issue_number=>48939,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/commits_controller.rb:87",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42330')",
  :issue_number=>42330,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/forks_controller.rb:122",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42335')",
  :issue_number=>42335,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/issues_controller.rb:362",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42422')",
  :issue_number=>42422,
  :has_issue_number=>true},
 {:file_location=>
   "app/controllers/projects/merge_requests/creations_controller.rb:137",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42384')",
  :issue_number=>42384,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/merge_requests_controller.rb:474",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42438')",
  :issue_number=>42438,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/network_controller.rb:46",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42333')",
  :issue_number=>42333,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/notes_controller.rb:91",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42383')",
  :issue_number=>42383,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/pipelines_controller.rb:97",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/26657')",
  :issue_number=>26657,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/projects/pipelines_controller.rb:276",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42339')",
  :issue_number=>42339,
  :has_issue_number=>true},
 {:file_location=>"app/controllers/registrations_controller.rb:166",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42380')",
  :issue_number=>42380,
  :has_issue_number=>true},
 {:file_location=>"app/graphql/mutations/boards/issues/issue_move_list.rb:56",
  :line=>
   "          Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/247861')",
  :issue_number=>247861,
  :has_issue_number=>true},
 {:file_location=>"app/graphql/mutations/concerns/mutations/assignable.rb:22",
  :line=>
   "      Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/issues/36098') if resource.is_a?(MergeRequest)",
  :issue_number=>36098,
  :has_issue_number=>true},
 {:file_location=>"app/graphql/mutations/issues/move.rb:14",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/267762')",
  :issue_number=>267762,
  :has_issue_number=>true},
 {:file_location=>"app/graphql/mutations/merge_requests/accept.rb:45",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42317')",
  :issue_number=>42317,
  :has_issue_number=>true},
 {:file_location=>"app/services/post_receive_service.rb:51",
  :line=>
   "    Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/61359')",
  :issue_number=>61359,
  :has_issue_number=>true},
 {:file_location=>
   "ee/app/controllers/ee/projects/merge_requests_controller.rb:68",
  :line=>
   "        ::Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/issues/4792')",
  :issue_number=>4792,
  :has_issue_number=>true},
 {:file_location=>"ee/lib/api/epics.rb:118",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/issues/194104')",
  :issue_number=>194104,
  :has_issue_number=>true},
 {:file_location=>"ee/lib/ee/api/merge_request_approvals.rb:93",
  :line=>
   "              ::Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/issues/8883')",
  :issue_number=>8883,
  :has_issue_number=>true},
 {:file_location=>"lib/api/ci/pipelines.rb:73",
  :line=>
   "          Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42124')",
  :issue_number=>42124,
  :has_issue_number=>true},
 {:file_location=>"lib/api/groups.rb:115",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/46285')",
  :issue_number=>46285,
  :has_issue_number=>true},
 {:file_location=>"lib/api/helpers/notes_helpers.rb:148",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab/-/issues/211538')",
  :issue_number=>211538,
  :has_issue_number=>true},
 {:file_location=>"lib/api/issues.rb:245",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42320')",
  :issue_number=>42320,
  :has_issue_number=>true},
 {:file_location=>"lib/api/issues.rb:291",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42322')",
  :issue_number=>42322,
  :has_issue_number=>true},
 {:file_location=>"lib/api/issues.rb:349",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42323')",
  :issue_number=>42323,
  :has_issue_number=>true},
 {:file_location=>"lib/api/merge_requests.rb:210",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42316')",
  :issue_number=>42316,
  :has_issue_number=>true},
 {:file_location=>"lib/api/merge_requests.rb:419",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42318')",
  :issue_number=>42318,
  :has_issue_number=>true},
 {:file_location=>"lib/api/merge_requests.rb:448",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42317')",
  :issue_number=>42317,
  :has_issue_number=>true},
 {:file_location=>"lib/api/project_import.rb:70",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42437')",
  :issue_number=>42437,
  :has_issue_number=>true},
 {:file_location=>"lib/api/projects.rb:313",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42284')",
  :issue_number=>42284,
  :has_issue_number=>true},
 {:file_location=>"lib/api/triggers.rb:24",
  :line=>
   "        Gitlab::QueryLimiting.disable!('https://gitlab.com/gitlab-org/gitlab-foss/issues/42283')",
  :issue_number=>42283,
  :has_issue_number=>true}]

--------------------------------------------------------------------------------


'QueryLimiting.disable' calls with no issue number (2 total):
[{:file_location=>"app/controllers/graphql_controller.rb:72",
  :line=>"    Gitlab::QueryLimiting.disable!(disable_issue)",
  :issue_number=>0,
  :has_issue_number=>false},
 {:file_location=>"spec/support/sidekiq_middleware.rb:22",
  :line=>"    ::Gitlab::QueryLimiting.disable!('https://mock-issue')",
  :issue_number=>0,
  :has_issue_number=>false}]

Process finished with exit code 0

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

Related

Edited by Chad Woolley

Merge request reports