Add failing test showing N+1

We have an N+1 problem where N is environments.
97 jobs for 63475-n-1-merge-requests-get_ci_environments_status in 52 minutes and 13 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
manual #235885789
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #235885790
gitlab-org
compile-assets pull-cache

00:07:03

passed #235885792
gitlab-org
retrieve-tests-metadata

00:01:56

passed #235885791
gitlab-org
setup-test-env

00:04:51

 
  Test
passed #235885872
docker gitlab-org
build-qa-image

00:05:06

passed #235885803
allowed to fail
code_quality

00:07:37

passed #235885874
gitlab-org
danger-review

00:01:50

passed #235885868
gitlab-org
db:check-schema-pg

00:02:05

passed #235885867
gitlab-org
db:migrate:reset-pg

00:04:54

passed #235885870
gitlab-org
db:rollback-pg

00:02:40

passed #235885805
allowed to fail
dependency_scanning

00:17:13

passed #235885793
gitlab-org
docs lint

00:02:39

passed #235885865
gitlab-org
downtime_check

00:03:46

passed #235885866
gitlab-org
ee_compat_check

00:02:55

passed #235885794
gitlab-org docker
gitlab:assets:compile pull-cache

00:13:19

passed #235885871
gitlab-org
gitlab:setup-pg

00:04:07

passed #235885875
gitlab-org
gitlab_git_test

00:00:25

passed #235885796
gitlab-org
jest

00:15:30

passed #235885795
gitlab-org
karma

00:11:26

54.59%
passed #235885877
gitlab-org
lint-ci-gitlab

00:00:29

passed #235885802
gitlab-org
memory-static

00:02:55

passed #235885869
gitlab-org
migration:path-pg

00:03:38

passed #235885876
gitlab-org
no_ee_check

00:00:31

passed #235885800
gitlab-org
qa-frontend-node:10

00:13:22

passed #235885799
gitlab-org
qa-frontend-node:8

00:15:52

passed #235885801
gitlab-org allowed to fail
qa-frontend-node:latest

00:12:21

passed #235885797
gitlab-org
qa:internal

00:04:38

passed #235885798
gitlab-org
qa:selectors

00:02:38

passed #235885873
allowed to fail manual
review-build-cng

00:21:41

passed #235885831
gitlab-org
rspec integration pg 1/6

00:14:03

passed #235885832
gitlab-org
rspec integration pg 2/6

00:17:31

passed #235885833
gitlab-org
rspec integration pg 3/6

00:17:04

passed #235885834
gitlab-org
rspec integration pg 4/6

00:15:30

passed #235885835
gitlab-org
rspec integration pg 5/6

00:15:07

passed #235885836
gitlab-org
rspec integration pg 6/6

00:16:00

passed #235885837
gitlab-org
rspec system pg 1/24

00:12:06

passed #235885846
gitlab-org
rspec system pg 10/24

00:11:27

passed #235885847
gitlab-org
rspec system pg 11/24

00:15:17

passed #235885848
gitlab-org
rspec system pg 12/24

00:12:36

passed #235885849
gitlab-org
rspec system pg 13/24

00:12:23

passed #235885851
gitlab-org
rspec system pg 14/24

00:11:44

passed #235885853
gitlab-org
rspec system pg 15/24

00:12:07

passed #235885854
gitlab-org
rspec system pg 16/24

00:12:30

passed #235885855
gitlab-org
rspec system pg 17/24

00:13:14

passed #235885856
gitlab-org
rspec system pg 18/24

00:12:35

passed #235885857
gitlab-org
rspec system pg 19/24

00:10:46

passed #235885838
gitlab-org
rspec system pg 2/24

00:14:07

passed #235885858
gitlab-org
rspec system pg 20/24

00:10:18

passed #235885859
gitlab-org
rspec system pg 21/24

00:12:34

passed #235885860
gitlab-org
rspec system pg 22/24

00:11:30

passed #235885861
gitlab-org
rspec system pg 23/24

00:12:52

passed #235885862
gitlab-org
rspec system pg 24/24

00:12:28

passed #235885839
gitlab-org
rspec system pg 3/24

00:11:50

passed #235885840
gitlab-org
rspec system pg 4/24

00:11:15

passed #235885841
gitlab-org
rspec system pg 5/24

00:09:48

passed #235885842
gitlab-org
rspec system pg 6/24

00:12:25

passed #235885843
gitlab-org
rspec system pg 7/24

00:12:31

passed #235885844
gitlab-org
rspec system pg 8/24

00:12:41

passed #235885845
gitlab-org
rspec system pg 9/24

00:12:17

passed #235885806
gitlab-org
rspec unit pg 1/20

00:13:56

passed #235885816
gitlab-org
rspec unit pg 10/20

00:17:33

passed #235885818
gitlab-org
rspec unit pg 11/20

00:14:54

passed #235885820
gitlab-org
rspec unit pg 12/20

00:18:32

passed #235885822
gitlab-org
rspec unit pg 13/20

00:19:12

passed #235885823
gitlab-org
rspec unit pg 14/20

00:19:58

passed #235885825
gitlab-org
rspec unit pg 15/20

00:14:03

passed #235885826
gitlab-org
rspec unit pg 16/20

00:13:50

passed #235885827
gitlab-org
rspec unit pg 17/20

00:19:48

passed #235885828
gitlab-org
rspec unit pg 18/20

00:17:25

passed #235885829
gitlab-org
rspec unit pg 19/20

00:17:29

passed #235885808
gitlab-org
rspec unit pg 2/20

00:15:19

passed #235885830
gitlab-org
rspec unit pg 20/20

00:18:43

passed #235885809
gitlab-org
rspec unit pg 3/20

00:13:22

passed #235885810
gitlab-org
rspec unit pg 4/20

00:13:35

passed #235885811
gitlab-org
rspec unit pg 5/20

00:16:51

passed #235885812
gitlab-org
rspec unit pg 6/20

00:13:38

passed #235885813
gitlab-org
rspec unit pg 7/20

00:13:55

passed #235885814
gitlab-org
rspec unit pg 8/20

00:15:58

passed #235885815
gitlab-org
rspec unit pg 9/20

00:18:29

passed #235885863
gitlab-org
rspec-fast-spec-helper

00:02:45

failed #235885804
allowed to fail
sast

00:31:05

passed #235885864
gitlab-org
static-analysis

00:13:08

 
  Review
manual #235885878
allowed to fail manual
package-and-qa
failed #235885879
gitlab-org allowed to fail
review-deploy

00:00:40

manual #235885880
gitlab-org allowed to fail manual
review-stop
 
  Qa
failed #235885887
docker gitlab-org allowed to fail
review-performance

00:06:03

manual #235885882
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #235885883
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #235885884
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #235885885
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #235885886
docker gitlab-org allowed to fail manual
review-qa-all 5/5
failed #235885881
docker gitlab-org allowed to fail
review-qa-smoke

00:06:44

 
  Post Test
passed #235885890
gitlab-org
coverage

00:03:03

95.73%
failed #235885891
gitlab-org allowed to fail
flaky-examples-check

00:01:59

passed #235885889
gitlab-org
jsdoc

00:01:13

passed #235885888
gitlab-org
lint:javascript:report

00:02:47

 
  Post Cleanup
manual #235885892
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
flaky-examples-check Post Test
    "first_flaky_at": "2019-06-20 03:13:12 +0000",
"last_flaky_at": "2019-06-20 03:13:12 +0000",
"last_flaky_job": "https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/235885815"
}
}
Running after script...
$ date
Thu Jun 20 03:47:04 UTC 2019
ERROR: Job failed: exit code 1
failed
review-qa-smoke Qa
  /home/qa/qa/scenario/bootable.rb:28:in `launch!'
bin/qa:7:in `<top (required)>'
Running after script...
$ date
Thu Jun 20 03:45:02 UTC 2019
Uploading artifacts...
./qa/gitlab-qa-run-*: found 2 matching files
Uploading artifacts to coordinator... ok id=235885881 responseStatus=201 Created token=uz17yYuy
ERROR: Job failed: exit code 1
failed
review-performance Qa
    at processImmediate [as _immediateCallback] (timers.js:722:5)
[2019-06-20 03:44:20] INFO: HTML stored in /sitespeed.io/sitespeed-results
[2019-06-20 03:44:20] INFO: Finished analysing https://gitlab-review-63475-n-1-b014ut.ce.gitlab-review.app
Running after script...
$ mv sitespeed-results/data/performance.json performance.json
Uploading artifacts...
performance.json: found 1 matching files
Uploading artifacts to coordinator... ok id=235885887 responseStatus=201 Created token=UoJeEkz-
ERROR: Job failed: exit code 1
failed
review-deploy Review
Waiting for rollout to finish: 0 of 2 updated replicas are available...
error: watch closed before Until timeout
Running after script...
$ date
Thu Jun 20 03:38:08 UTC 2019
Uploading artifacts...
review_app_url.txt: found 1 matching files
Uploading artifacts to coordinator... ok id=235885879 responseStatus=201 Created token=4oR5H3ye
ERROR: Job failed: exit code 1
failed
sast Test
2019/06/20 03:33:47 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2019/06/20 03:33:47 Timeout when running the analyzer
Running after script...
$ date
Thu Jun 20 03:33:54 UTC 2019
Uploading artifacts...
WARNING: gl-sast-report.json: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1