Refactor pagination helper, extract classes

This refactors the pagination helper and extracts the logic into
Gitlab::Pagination. The goal here is to change
Gitlab::Serializer::Pagination (which is in app/) to *not* use
Api::Helpers::Pagination anymore. Instead, it calls the extracted
classes directly.

This is a preparation to add more pagination strategies to the API only
(like keyset pagination).
172 jobs for !18840 with ab/refactor-pagination in 213 minutes and 26 seconds (queued for 7 seconds)
detached
Status Job ID Name Coverage
  Prepare
passed #326499000
docker gitlab-org
build-qa-image

00:05:59

passed #326498996
gitlab-org
compile-assets pull-cache

00:10:02

passed #326498998
gitlab-org
compile-assets pull-cache foss

00:09:23

passed #326499002
retrieve-tests-metadata

00:02:00

passed #326499001
gitlab-org
review-cleanup-failed-deployment

00:00:37

passed #326498999
gitlab-org
setup-test-env

00:09:40

 
  Test
passed #326499020
allowed to fail
code_quality

00:09:28

passed #326499283
gitlab-org
danger-review

00:02:40

passed #326499271
gitlab-org
db:check-schema

00:05:38

passed #326499274
gitlab-org
db:migrate-from-v11.11.0

00:09:41

passed #326499270
gitlab-org
db:migrate:reset

00:03:39

passed #326499276
gitlab-org
db:rollback

00:03:57

passed #326499279
gitlab-org
db:rollback geo

00:03:55

passed #326499022
allowed to fail
dependency_scanning

00:11:37

passed #326499269
gitlab-org
downtime_check

00:04:52

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

00:20:25

passed #326499278
gitlab-org
gitlab:setup

00:05:37

passed #326499285
gitlab-org
gitlab_git_test

00:00:32

passed #326499006
gitlab-org
jest

00:24:14

passed #326499008
gitlab-org
jest-foss

00:18:33

passed #326499004
gitlab-org
karma

00:21:33

67.67%
passed #326499005
gitlab-org
karma-foss

00:12:22

passed #326499014
gitlab-org
memory-on-boot

00:07:25

passed #326499013
gitlab-org
memory-static

00:04:56

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

00:18:09

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

00:20:55

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

00:21:39

passed #326499017
gitlab-org
qa:internal

00:01:42

passed #326499018
gitlab-org
qa:selectors

00:02:15

passed #326499019
gitlab-org
qa:selectors-foss

00:01:42

passed #326499266
gitlab-org
rspec fast_spec_helper

00:04:20

passed #326499089
gitlab-org
rspec integration pg9 1/6

00:22:14

passed #326499090
gitlab-org
rspec integration pg9 2/6

00:18:33

passed #326499093
gitlab-org
rspec integration pg9 3/6

00:21:08

passed #326499095
gitlab-org
rspec integration pg9 4/6

00:22:03

passed #326499096
gitlab-org
rspec integration pg9 5/6

00:24:24

passed #326499097
gitlab-org
rspec integration pg9 6/6

00:20:04

passed #326499102
gitlab-org
rspec integration pg9-foss 1/6

00:22:32

passed #326499107
gitlab-org
rspec integration pg9-foss 2/6

00:16:15

passed #326499111
gitlab-org
rspec integration pg9-foss 3/6

00:15:54

passed #326499113
gitlab-org
rspec integration pg9-foss 4/6

00:17:27

passed #326499114
gitlab-org
rspec integration pg9-foss 5/6

00:20:52

passed #326499115
gitlab-org
rspec integration pg9-foss 6/6

00:15:40

passed #326499116
gitlab-org
rspec system pg9 1/24

00:12:39

passed #326499130
gitlab-org
rspec system pg9 10/24

00:15:44

passed #326499132
gitlab-org
rspec system pg9 11/24

00:15:09

passed #326499134
gitlab-org
rspec system pg9 12/24

00:14:01

passed #326499136
gitlab-org
rspec system pg9 13/24

00:16:11

passed #326499138
gitlab-org
rspec system pg9 14/24

00:12:38

passed #326499141
gitlab-org
rspec system pg9 15/24

00:15:31

passed #326499144
gitlab-org
rspec system pg9 16/24

00:14:33

passed #326499148
gitlab-org
rspec system pg9 17/24

00:15:44

passed #326499151
gitlab-org
rspec system pg9 18/24

00:15:53

passed #326499153
gitlab-org
rspec system pg9 19/24

00:15:29

passed #326499117
gitlab-org
rspec system pg9 2/24

00:14:12

passed #326499155
gitlab-org
rspec system pg9 20/24

00:14:59

passed #326499157
gitlab-org
rspec system pg9 21/24

00:15:10

passed #326499158
gitlab-org
rspec system pg9 22/24

00:14:48

passed #326499161
gitlab-org
rspec system pg9 23/24

00:16:26

passed #326499163
gitlab-org
rspec system pg9 24/24

00:13:21

passed #326499118
gitlab-org
rspec system pg9 3/24

00:17:41

passed #326499119
gitlab-org
rspec system pg9 4/24

00:17:03

passed #326499121
gitlab-org
rspec system pg9 5/24

00:13:44

passed #326499123
gitlab-org
rspec system pg9 6/24

00:15:27

passed #326499125
gitlab-org
rspec system pg9 7/24

00:14:32

passed #326499127
gitlab-org
rspec system pg9 8/24

00:11:41

passed #326499128
gitlab-org
rspec system pg9 9/24

00:14:56

passed #326499166
gitlab-org
rspec system pg9-foss 1/24

00:11:45

passed #326499193
gitlab-org
rspec system pg9-foss 10/24

00:13:01

passed #326499195
gitlab-org
rspec system pg9-foss 11/24

00:13:37

passed #326499197
gitlab-org
rspec system pg9-foss 12/24

00:12:06

passed #326499199
gitlab-org
rspec system pg9-foss 13/24

00:11:20

passed #326499201
gitlab-org
rspec system pg9-foss 14/24

00:12:54

passed #326499203
gitlab-org
rspec system pg9-foss 15/24

00:17:42

passed #326499206
gitlab-org
rspec system pg9-foss 16/24

00:16:04

passed #326499208
gitlab-org
rspec system pg9-foss 17/24

00:12:08

passed #326499210
gitlab-org
rspec system pg9-foss 18/24

00:15:33

passed #326499212
gitlab-org
rspec system pg9-foss 19/24

00:13:53

passed #326499169
gitlab-org
rspec system pg9-foss 2/24

00:13:30

passed #326499213
gitlab-org
rspec system pg9-foss 20/24

00:14:27

passed #326499215
gitlab-org
rspec system pg9-foss 21/24

00:15:03

passed #326499218
gitlab-org
rspec system pg9-foss 22/24

00:12:31

passed #326499220
gitlab-org
rspec system pg9-foss 23/24

00:11:39

passed #326499221
gitlab-org
rspec system pg9-foss 24/24

00:11:36

passed #326499172
gitlab-org
rspec system pg9-foss 3/24

00:13:13

passed #326499175
gitlab-org
rspec system pg9-foss 4/24

00:10:16

passed #326499180
gitlab-org
rspec system pg9-foss 5/24

00:15:23

passed #326499184
gitlab-org
rspec system pg9-foss 6/24

00:14:50

passed #326499187
gitlab-org
rspec system pg9-foss 7/24

00:13:44

passed #326499189
gitlab-org
rspec system pg9-foss 8/24

00:14:47

passed #326499191
gitlab-org
rspec system pg9-foss 9/24

00:12:50

passed #326499023
gitlab-org
rspec unit pg9 1/20

00:21:57

passed #326499034
gitlab-org
rspec unit pg9 10/20

00:15:55

passed #326499035
gitlab-org
rspec unit pg9 11/20

00:17:54

passed #326499036
gitlab-org
rspec unit pg9 12/20

00:18:07

passed #326499037
gitlab-org
rspec unit pg9 13/20

00:19:17

passed #326499038
gitlab-org
rspec unit pg9 14/20

00:16:33

passed #326499039
gitlab-org
rspec unit pg9 15/20

00:19:03

passed #326499040
gitlab-org
rspec unit pg9 16/20

00:14:22

passed #326499041
gitlab-org
rspec unit pg9 17/20

00:17:04

passed #326499045
gitlab-org
rspec unit pg9 18/20

00:17:33

passed #326499047
gitlab-org
rspec unit pg9 19/20

00:16:39

passed #326499024
gitlab-org
rspec unit pg9 2/20

00:12:35

passed #326499050
gitlab-org
rspec unit pg9 20/20

00:20:04

passed #326499025
gitlab-org
rspec unit pg9 3/20

00:17:10

passed #326499026
gitlab-org
rspec unit pg9 4/20

00:15:57

passed #326499027
gitlab-org
rspec unit pg9 5/20

00:15:01

passed #326499028
gitlab-org
rspec unit pg9 6/20

00:17:03

passed #326499029
gitlab-org
rspec unit pg9 7/20

00:18:28

passed #326499030
gitlab-org
rspec unit pg9 8/20

00:16:13

passed #326499032
gitlab-org
rspec unit pg9 9/20

00:17:00

passed #326499052
gitlab-org
rspec unit pg9-foss 1/20

00:18:43

passed #326499071
gitlab-org
rspec unit pg9-foss 10/20

00:17:26

passed #326499074
gitlab-org
rspec unit pg9-foss 11/20

00:15:44

passed #326499077
gitlab-org
rspec unit pg9-foss 12/20

00:17:04

passed #326499079
gitlab-org
rspec unit pg9-foss 13/20

00:20:08

passed #326499081
gitlab-org
rspec unit pg9-foss 14/20

00:15:04

passed #326499083
gitlab-org
rspec unit pg9-foss 15/20

00:16:37

passed #326499084
gitlab-org
rspec unit pg9-foss 16/20

00:16:45

passed #326499085
gitlab-org
rspec unit pg9-foss 17/20

00:19:30

passed #326499086
gitlab-org
rspec unit pg9-foss 18/20

00:17:41

passed #326499087
gitlab-org
rspec unit pg9-foss 19/20

00:14:37

passed #326499054
gitlab-org
rspec unit pg9-foss 2/20

00:13:18

passed #326499088
gitlab-org
rspec unit pg9-foss 20/20

00:18:03

passed #326499056
gitlab-org
rspec unit pg9-foss 3/20

00:15:58

passed #326499058
gitlab-org
rspec unit pg9-foss 4/20

00:17:21

passed #326499060
gitlab-org
rspec unit pg9-foss 5/20

00:13:24

passed #326499062
gitlab-org
rspec unit pg9-foss 6/20

00:14:36

passed #326499064
gitlab-org
rspec unit pg9-foss 7/20

00:15:50

passed #326499066
gitlab-org
rspec unit pg9-foss 8/20

00:15:09

passed #326499069
gitlab-org
rspec unit pg9-foss 9/20

00:17:05

passed #326499263
gitlab-org
rspec-ee integration pg10 geo

00:07:18

passed #326499238
gitlab-org
rspec-ee integration pg9 1/3

00:16:31

passed #326499239
gitlab-org
rspec-ee integration pg9 2/3

00:14:39

passed #326499240
gitlab-org
rspec-ee integration pg9 3/3

00:14:11

passed #326499259
gitlab-org
rspec-ee integration pg9 geo

00:07:07

passed #326499264
gitlab-org
rspec-ee system pg10 geo

00:07:50

passed #326499242
gitlab-org
rspec-ee system pg9 1/5

00:17:37

passed #326499244
gitlab-org
rspec-ee system pg9 2/5

00:17:43

passed #326499248
gitlab-org
rspec-ee system pg9 3/5

00:15:24

passed #326499251
gitlab-org
rspec-ee system pg9 4/5

00:18:50

passed #326499253
gitlab-org
rspec-ee system pg9 5/5

00:18:29

passed #326499260
gitlab-org
rspec-ee system pg9 geo

00:07:37

passed #326499261
gitlab-org
rspec-ee unit pg10 geo 1/2

00:14:48

passed #326499262
gitlab-org
rspec-ee unit pg10 geo 2/2

00:13:37

passed #326499224
gitlab-org
rspec-ee unit pg9 1/7

00:12:35

passed #326499226
gitlab-org
rspec-ee unit pg9 2/7

00:15:30

passed #326499228
gitlab-org
rspec-ee unit pg9 3/7

00:15:06

passed #326499230
gitlab-org
rspec-ee unit pg9 4/7

00:14:07

passed #326499231
gitlab-org
rspec-ee unit pg9 5/7

00:18:15

passed #326499232
gitlab-org
rspec-ee unit pg9 6/7

00:19:01

passed #326499235
gitlab-org
rspec-ee unit pg9 7/7

00:16:58

passed #326499256
gitlab-org
rspec-ee unit pg9 geo 1/2

00:13:12

passed #326499258
gitlab-org
rspec-ee unit pg9 geo 2/2

00:13:16

failed #326499021
allowed to fail
sast

00:05:50

passed #326499267
gitlab-org
static-analysis

00:19:51

passed #326499012
gitlab-org
webpack-dev-server

00:05:00

 
  Review Prepare
passed #326499287
review-build-cng

00:34:05

 
  Review
passed #326499288
gitlab-org allowed to fail
review-deploy

00:13:45

passed #326499289
gitlab-org allowed to fail manual
review-stop

00:00:33

 
  Qa
passed #326499291
allowed to fail
dast

00:08:03

failed #326499290
allowed to fail manual
package-and-qa-manual

02:00:00

passed #326499298
docker gitlab-org allowed to fail
review-performance

00:03:04

manual #326499293
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #326499294
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #326499295
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #326499296
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #326499297
docker gitlab-org allowed to fail manual
review-qa-all 5/5
passed #326499292
docker gitlab-org allowed to fail
review-qa-smoke

00:05:01

 
  Post Test
passed #326499301
gitlab-org
coverage

00:06:49

97.26%
passed #326499306
gitlab-org allowed to fail
flaky-examples-check

00:03:44

failed #326499304
gitlab-org allowed to fail manual
parallel-spec-reports

00:01:23

 
Name Stage Failure
failed
package-and-qa-manual Qa The script exceeded the maximum execution time set for the job
Successfully installed unicode-display_width-1.6.0
Successfully installed terminal-table-1.8.0
Successfully installed gitlab-4.12.0
7 gems installed
$ ./scripts/trigger-build omnibus
Triggered downstream pipeline: https://gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/pipelines/90247764
Waiting for downstream pipeline status
.......................................................................................................................
Pulling docker image gitlab/gitlab-runner-helper:x86_64-27104773 ...
ERROR: Job failed: execution took longer than 2h0m0s seconds
failed
parallel-spec-reports Post Test
Mon Oct 21 14:00:36 UTC 2019
Uploading artifacts...
WARNING: qa/report-new.html: no matching files
WARNING: qa/gitlab-qa-run-*: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: qa/gitlab-qa-run-*/**/rspec-*.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 2
failed
sast Test
2019/10/21 11:38:14 exit status 1
2019/10/21 11:38:14 Container exited with non zero status code
Running after script...
$ date
Mon Oct 21 11:38:16 UTC 2019
Uploading artifacts...
WARNING: gl-sast-report.json: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1