Display message if MR Security report is outdated

When the last pipeline for the target branch hadn't detected some
security issues, maybe due to jobs failed or artifacts expired, the
MR security report should be considered outdated and the pipeline needs
to be re-run. It also handles the edge case when target branch has
received more commits and the current branch needs to be updated.
184 jobs for !20954 with 4913-frontend-outdated-security-report in 79 minutes and 29 seconds (queued for 7 seconds)
detached
Status Job ID Name Coverage
  Prepare
passed #378610969
docker gitlab-org
build-qa-image

00:03:33

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

00:09:10

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

00:08:40

manual #378610975
gitlab-org allowed to fail manual
manual:review-cleanup
passed #378610979
retrieve-tests-metadata

00:02:11

passed #378610977
gitlab-org
review-stop-failed-deployment

00:00:22

passed #378610966
gitlab-org
setup-test-env

00:08:31

 
  Test
passed #378611010
allowed to fail
code_quality

00:11:29

passed #378611304
gitlab-org
danger-review

00:03:57

passed #378611295
gitlab-org
db:check-schema

00:04:24

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

00:11:36

passed #378611293
gitlab-org
db:migrate:reset

00:04:41

passed #378611298
gitlab-org
db:rollback

00:05:22

passed #378611303
gitlab-org
db:rollback geo

00:04:33

passed #378611012
allowed to fail
dependency_scanning

00:12:21

passed #378611291
gitlab-org
downtime_check

00:03:55

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

00:21:33

passed #378611301
gitlab-org
gitlab:setup

00:04:56

passed #378611305
gitlab-org
gitlab_git_test

00:00:58

passed #378610980
gitlab-org
graphql-reference-verify

00:07:07

passed #378610987
gitlab-org
jest

00:23:55

passed #378610990
gitlab-org
jest-foss

00:20:42

passed #378610984
gitlab-org
karma

00:16:55

78.11%
passed #378610986
gitlab-org
karma-foss

00:11:50

passed #378611307
gitlab-org
lint-ci-gitlab

00:01:06

passed #378611003
gitlab-org
memory-on-boot

00:07:04

passed #378611001
gitlab-org
memory-static

00:06:07

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

00:16:14

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

00:17:28

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

00:18:50

passed #378611005
gitlab-org
qa:internal

00:02:28

passed #378611007
gitlab-org
qa:selectors

00:02:15

passed #378611008
gitlab-org
qa:selectors-foss

00:02:29

passed #378611287
gitlab-org
rspec fast_spec_helper

00:05:18

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

00:17:28

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

00:23:15

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

00:17:36

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

00:22:52

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

00:18:25

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

00:20:23

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

00:17:07

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

00:16:24

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

00:17:29

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

00:16:26

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

00:18:49

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

00:17:38

passed #378611014
gitlab-org
rspec migration pg9 1/4

00:08:51

passed #378611016
gitlab-org
rspec migration pg9 2/4

00:17:13

passed #378611017
gitlab-org
rspec migration pg9 3/4

00:17:37

passed #378611020
gitlab-org
rspec migration pg9 4/4

00:20:10

passed #378611021
gitlab-org
rspec migration pg9-foss 1/4

00:08:20

passed #378611022
gitlab-org
rspec migration pg9-foss 2/4

00:15:29

passed #378611023
gitlab-org
rspec migration pg9-foss 3/4

00:18:20

passed #378611025
gitlab-org
rspec migration pg9-foss 4/4

00:18:56

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

00:13:25

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

00:14:11

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

00:15:18

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

00:17:57

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

00:15:36

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

00:16:41

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

00:15:41

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

00:17:16

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

00:16:38

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

00:16:53

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

00:18:18

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

00:16:39

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

00:14:38

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

00:15:25

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

00:18:20

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

00:16:35

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

00:15:01

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

00:14:40

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

00:16:31

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

00:15:30

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

00:14:43

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

00:18:22

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

00:18:44

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

00:18:16

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

00:14:40

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

00:15:31

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

00:13:33

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

00:15:55

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

00:13:42

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

00:15:29

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

00:14:28

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

00:15:01

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

00:16:12

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

00:15:46

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

00:14:00

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

00:14:33

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

00:13:06

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

00:14:11

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

00:16:26

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

00:16:42

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

00:14:21

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

00:16:57

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

00:15:28

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

00:13:03

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

00:14:50

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

00:15:09

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

00:15:33

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

00:14:26

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

00:18:41

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

00:17:26

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

00:20:26

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

00:18:44

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

00:19:31

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

00:19:27

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

00:21:34

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

00:16:58

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

00:20:29

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

00:21:17

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

00:21:34

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

00:15:40

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

00:20:20

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

00:16:46

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

00:17:03

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

00:15:55

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

00:17:12

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

00:17:23

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

00:20:55

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

00:17:15

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

00:17:09

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

00:16:36

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

00:17:59

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

00:15:58

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

00:17:27

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

00:20:43

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

00:18:50

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

00:17:27

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

00:17:54

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

00:17:56

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

00:18:47

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

00:13:37

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

00:17:44

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

00:15:44

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

00:14:55

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

00:15:57

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

00:17:50

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

00:17:17

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

00:17:49

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

00:14:43

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

00:07:30

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

00:15:41

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

00:16:00

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

00:17:37

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

00:07:50

passed #378611236
gitlab-org
rspec-ee migration pg9 1/2

00:07:22

passed #378611239
gitlab-org
rspec-ee migration pg9 2/2

00:08:10

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

00:09:18

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

00:17:35

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

00:19:54

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

00:18:12

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

00:21:03

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

00:18:58

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

00:07:19

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

00:14:38

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

00:17:33

passed #378611242
gitlab-org
rspec-ee unit pg9 1/5

00:22:25

passed #378611244
gitlab-org
rspec-ee unit pg9 2/5

00:19:24

passed #378611246
gitlab-org
rspec-ee unit pg9 3/5

00:26:25

passed #378611250
gitlab-org
rspec-ee unit pg9 4/5

00:26:50

passed #378611254
gitlab-org
rspec-ee unit pg9 5/5

00:24:12

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

00:14:30

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

00:17:07

passed #378611011
allowed to fail
sast

00:12:09

passed #378611288
gitlab-org
static-analysis 1/2

00:14:54

passed #378611289
gitlab-org
static-analysis 2/2

00:10:28

passed #378611000
gitlab-org
webpack-dev-server

00:06:03

 
  Post Test
passed #378611308
gitlab-org
coverage

00:08:10

97.46%
failed #378611309
gitlab-org allowed to fail
flaky-examples-check

00:04:47

 
  Review Prepare
passed #378611311
gitlab-org
review-build-cng

00:23:10

 
  Review
failed #378611313
gitlab-org allowed to fail
review-deploy

00:18:20

manual #378611315
gitlab-org allowed to fail manual
review-stop
 
  Qa
passed #378611318
allowed to fail
dast

00:06:39

manual #378611317
allowed to fail manual
package-and-qa-manual
passed #378611329
docker gitlab-org allowed to fail
review-performance

00:04:22

manual #378611322
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #378611324
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #378611325
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #378611326
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #378611328
docker gitlab-org allowed to fail manual
review-qa-all 5/5
passed #378611320
docker gitlab-org allowed to fail
review-qa-smoke

00:07:49

 
  Post Qa
manual #378611330
gitlab-org allowed to fail manual
parallel-spec-reports
 
Name Stage Failure
failed
review-deploy Review
      helm upgrade     --tiller-namespace="review-apps-ee"     --namespace="review-apps-ee"     --install     --wait     --timeout 900     --set ci.branch="4913-frontend-outdated-security-report"     --set ci.commit.sha="67848173"     --set ci.job.url="https://gitlab.com/gitlab-org/gitlab/-/jobs/378611313"     --set ci.pipeline.url="https://gitlab.com/gitlab-org/gitlab/pipelines/102871724"     --set releaseOverride="review-4913-front-eb5qyn"     --set global.hosts.hostSuffix="review-4913-front-eb5qyn"     --set global.hosts.domain="gitlab-review.app"     --set gitlab.migrations.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-rails-ee"     --set gitlab.migrations.image.tag="4913-frontend-outdated-security-report"     --set gitlab.gitaly.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitaly"     --set gitlab.gitaly.image.tag="v1.75.0"     --set gitlab.gitlab-shell.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-shell"     --set gitlab.gitlab-shell.image.tag="v10.3.0"     --set gitlab.sidekiq.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-sidekiq-ee"     --set gitlab.sidekiq.image.tag="4913-frontend-outdated-security-report"     --set gitlab.unicorn.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-unicorn-ee"     --set gitlab.unicorn.image.tag="4913-frontend-outdated-security-report"     --set gitlab.unicorn.workhorse.image="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-workhorse-ee"     --set gitlab.unicorn.workhorse.tag="4913-frontend-outdated-security-report"     --set gitlab.task-runner.image.repository="registry.gitlab.com/gitlab-org/build/cng-mirror/gitlab-task-runner-ee"     --set gitlab.task-runner.image.tag="4913-frontend-outdated-security-report"   --set global.gitlab.license.secret="shared-gitlab-license"   --version="102871724-378611313"   -f "https://gitlab.com/gitlab-org/gitlab/raw/master/scripts/review_apps/base-config.yaml"   "review-4913-front-eb5qyn" .
Release "review-4913-front-eb5qyn" does not exist. Installing it now.
Running after script...
$ date
Fri Dec 13 12:46:59 UTC 2019
Uploading artifacts...
review_app_url.txt: found 1 matching files
Uploading artifacts to coordinator... ok
id=378611313 responseStatus=201 Created token=iGzposLN
ERROR: Job failed: exit code 1
failed
flaky-examples-check Post Test
    "first_flaky_at": "2019-12-13 12:00:57 +0000",
"last_flaky_at": "2019-12-13 12:00:57 +0000",
"last_flaky_job": "https://gitlab.com/gitlab-org/gitlab/-/jobs/378611126"
}
}
Running after script...
$ date
Fri Dec 13 12:16:37 UTC 2019
ERROR: Job failed: exit code 1