Commit Graph

6 Commits

Author SHA1 Message Date
GitLab Bot 3832718d89 Add latest changes from gitlab-org/gitlab@master 2020-01-22 18:08:47 +00:00
Stan Hu 08c3e59aee Optimize /admin/applications so that it does not timeout
On our dev instance, /admin/applications as not loading because:

1. There was an unindexed query by `application_id`.
2. There was an expensive query that attempted to load 1 million
   unique entries via ActiveRecord just to find the unique count.

We fix the first issue by adding an index for that column.

We fix the second issue with a simple SELECT COUNT(DISTINCT
resource_owner_id) SQL query.

In addition, we add pagination to avoid loading more than 20
applications at once.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/67228
2019-09-09 21:51:57 -07:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Oswaldo Ferreira e561b142fa Backport gitlab-ee!2456 2017-07-27 12:09:46 -04:00
Markus Koller 789db2cc19 Make sure scopes are loaded in admin OAuth application form 2017-03-07 14:54:36 +01:00