Avoid storing backtraces from Bitbucket Cloud imports in the database

We noticed in
gitlab-com/gl-infra/production#908 some
Bitbucket imports took over a second to load their projects row because
`import_error` was huge due to errors. To prevent this, we now:

1. Clean the backtraces
2. Log the details into importer.log
3. Omit the details from the database
98 jobs for sh-clean-up-bitbucket-import-errors in 59 minutes and 2 seconds (queued for 4 seconds)
Status Job ID Name Coverage
  Build
manual #235282285
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #235282288
gitlab-org
compile-assets pull-cache

00:06:11

passed #235282290
gitlab-org
retrieve-tests-metadata

00:00:25

passed #235282289
gitlab-org
setup-test-env

00:04:32

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

00:05:41

passed #235282302
allowed to fail
code_quality

00:07:49

passed #235282383
gitlab-org
danger-review

00:02:12

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

00:06:42

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

00:08:00

passed #235282379
gitlab-org
db:rollback-pg

00:02:38

passed #235282304
allowed to fail
dependency_scanning

00:19:20

passed #235282291
gitlab-org
docs lint

00:02:48

passed #235282374
gitlab-org
downtime_check

00:06:00

passed #235282375
gitlab-org
ee_compat_check

00:05:43

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

00:16:18

passed #235282380
gitlab-org
gitlab:setup-pg

00:10:06

failed #235282293
gitlab-org allowed to fail
gitlab:ui:visual

00:01:39

passed #235282385
gitlab-org
gitlab_git_test

00:00:29

passed #235282295
gitlab-org
jest

00:18:38

passed #235282294
gitlab-org
karma

00:14:00

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

00:00:54

passed #235282301
gitlab-org
memory-static

00:08:36

passed #235282378
gitlab-org
migration:path-pg

00:04:35

passed #235282387
gitlab-org
no_ee_check

00:00:45

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

00:13:17

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

00:14:30

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

00:12:10

passed #235282296
gitlab-org
qa:internal

00:09:28

passed #235282297
gitlab-org
qa:selectors

00:06:22

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

00:24:58

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

00:19:13

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

00:18:41

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

00:19:34

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

00:17:59

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

00:22:07

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

00:15:25

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

00:14:04

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

00:16:10

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

00:15:45

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

00:14:54

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

00:12:38

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

00:15:08

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

00:14:45

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

00:15:12

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

00:17:14

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

00:14:20

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

00:12:07

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

00:14:06

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

00:15:42

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

00:12:05

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

00:11:27

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

00:12:09

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

00:16:02

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

00:16:22

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

00:13:38

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

00:10:55

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

00:13:45

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

00:11:15

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

00:14:41

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

00:14:01

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

00:15:10

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

00:19:00

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

00:18:43

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

00:21:24

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

00:19:39

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

00:20:40

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

00:17:09

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

00:19:13

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

00:18:21

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

00:20:17

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

00:17:11

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

00:14:04

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

00:16:56

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

00:10:58

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

00:17:20

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

00:16:56

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

00:18:17

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

00:14:59

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

00:15:20

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

00:19:12

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

00:05:19

failed #235282303
allowed to fail
sast

00:33:08

passed #235282373
gitlab-org
static-analysis

00:13:31

 
  Review
manual #235282391
allowed to fail manual
package-and-qa
failed #235282393
gitlab-org allowed to fail
review-deploy

00:00:32

manual #235282395
gitlab-org allowed to fail manual
review-stop
 
  Qa
failed #235282402
docker gitlab-org allowed to fail
review-performance

00:06:11

manual #235282397
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #235282398
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #235282399
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #235282400
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #235282401
docker gitlab-org allowed to fail manual
review-qa-all 5/5
failed #235282396
docker gitlab-org allowed to fail
review-qa-smoke

00:07:10

 
  Post Test
passed #235282405
gitlab-org
coverage

00:03:53

95.73%
passed #235282406
gitlab-org allowed to fail
flaky-examples-check

00:01:56

passed #235282404
gitlab-org
jsdoc

00:01:19

passed #235282403
gitlab-org
lint:javascript:report

00:00:47

 
  Post Cleanup
manual #235282407
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
review-qa-smoke Qa
	 1: from /usr/local/lib/ruby/2.6.0/net/protocol.rb:191:in `readuntil'
/usr/local/lib/ruby/2.6.0/net/protocol.rb:217:in `rbuf_fill':
Net::ReadTimeout with #<TCPSocket:(closed)> (Net::ReadTimeout)
Running after script...
$ date
Wed Jun 19 20:00:06 UTC 2019
Uploading artifacts...
./qa/gitlab-qa-run-*: found 2 matching files
Uploading artifacts to coordinator... ok id=235282396 responseStatus=201 Created token=vGfeDucG
ERROR: Job failed: exit code 1
failed
review-performance Qa
    at processImmediate [as _immediateCallback] (timers.js:722:5)
[2019-06-19 19:59:09] INFO: HTML stored in /sitespeed.io/sitespeed-results
[2019-06-19 19:59:09] INFO: Finished analysing https://gitlab-review-sh-clean-u-sruukg.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=235282402 responseStatus=201 Created token=md-2ypyb
ERROR: Job failed: exit code 1
failed
review-deploy Review
error: watch closed before Until timeout
Waiting for rollout to finish: 1 of 2 updated replicas are available...
Running after script...
$ date
Wed Jun 19 19:52:54 UTC 2019
Uploading artifacts...
review_app_url.txt: found 1 matching files
Uploading artifacts to coordinator... ok id=235282393 responseStatus=201 Created token=BihDFHsd
ERROR: Job failed: exit code 1
failed
sast Test
2019/06/19 19:44:23 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2019/06/19 19:44:23 Timeout when running the analyzer
Running after script...
$ date
Wed Jun 19 19:44:32 UTC 2019
Uploading artifacts...
WARNING: gl-sast-report.json: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
gitlab:ui:visual Test
$ cp public/assets/application-*.css gitlab-ui/styles/application.css
cp: cannot create regular file 'gitlab-ui/styles/application.css': No such file or directory
Running after script...
$ date
Wed Jun 19 19:12:27 UTC 2019
Uploading artifacts...
gitlab-ui/tests/__image_snapshots__/: found 112 matching files
Uploading artifacts to coordinator... ok id=235282293 responseStatus=201 Created token=FGpexEuY
ERROR: Job failed: exit code 1