Addresses backend review comments

- Changes 'commit' to diffable, hopefully to make it compatible with
other diffs
- Renames diffs_per_paths to diffs_per_batch as it's more descriptive
- Abstract EnvironmentFinder method so it can be reused across different
controller actions.
- Additionally make all the files in batches render as expanded and load
the notes (if any).
- Makes batch_size an attribute of FileCollection::Batch
- Renames argument on decorate_batch!
101 jobs for 52499-mc-make-diffs-requests-and-rendering-smarter in 91 minutes and 4 seconds (queued for 5 seconds)
latest
Status Job ID Name Coverage
  Build
manual #224466726
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #224466727
gitlab-org
compile-assets

00:09:45

passed #224466729
gitlab-org
retrieve-tests-metadata

00:00:33

passed #224466728
gitlab-org
setup-test-env

00:04:20

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

00:05:00

passed #224466741
allowed to fail
code_quality

00:09:37

passed #224466812
gitlab-org
danger-review

00:02:48

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

00:04:13

passed #224466802
gitlab-org
db:migrate:reset-mysql

00:06:24

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

00:02:52

passed #224466807
gitlab-org
db:rollback-mysql

00:06:18

passed #224466806
gitlab-org
db:rollback-pg

00:04:48

passed #224466744
allowed to fail
dependency_scanning

00:10:58

passed #224466730
gitlab-org
docs lint

00:02:40

passed #224466799
gitlab-org
downtime_check

00:01:40

passed #224466800
gitlab-org
ee_compat_check

00:05:21

passed #225129137
docker gitlab-org
gitlab:assets:compile

00:24:05

passed #224466809
gitlab-org
gitlab:setup-mysql

00:06:08

passed #224466808
gitlab-org
gitlab:setup-pg

00:06:12

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

00:07:15

passed #224466813
gitlab-org
gitlab_git_test

00:02:07

passed #224466734
gitlab-org
jest

00:14:50

passed #224466733
gitlab-org
karma

00:11:54

56.46%
passed #224466805
gitlab-org
migration:path-mysql

00:16:50

passed #224466804
gitlab-org
migration:path-pg

00:17:15

passed #224466814
gitlab-org
no_ee_check

00:02:12

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

00:12:51

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

00:16:31

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

00:12:41

passed #224466735
gitlab-org
qa:internal

00:04:58

passed #224466736
gitlab-org
qa:selectors

00:05:15

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

00:21:38

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

00:18:07

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

00:13:47

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

00:16:27

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

00:17:05

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

00:18:06

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

00:16:13

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

00:17:14

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

00:15:54

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

00:15:25

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

00:13:42

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

00:15:23

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

00:13:46

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

00:13:06

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

00:15:27

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

00:14:18

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

00:15:27

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

00:13:39

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

00:17:06

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

00:13:46

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

00:15:19

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

00:13:37

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

00:15:19

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

00:15:02

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

00:14:42

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

00:14:41

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

00:15:30

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

00:12:09

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

00:14:18

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

00:14:57

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

00:14:41

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

00:15:59

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

00:17:35

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

00:16:07

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

00:16:23

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

00:16:47

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

00:14:29

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

00:16:58

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

00:15:11

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

00:17:58

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

00:15:46

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

00:14:18

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

00:15:57

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

00:17:32

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

00:15:58

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

00:12:36

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

00:14:16

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

00:12:22

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

00:13:56

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

00:13:42

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

00:17:55

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

00:06:00

failed #224466743
allowed to fail
sast

00:07:12

passed #224466798
gitlab-org
static-analysis

00:13:48

failed #224466731
gitlab-org docker
gitlab:assets:compile

01:40:00

 
  Review
manual #224466815
allowed to fail manual
package-and-qa
passed #224466816
gitlab-org
review-deploy

00:11:56

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

00:01:06

 
  Qa
passed #224466825
docker gitlab-org allowed to fail
review-performance

00:02:42

manual #224466819
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #224466821
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #224466822
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #224466823
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #224466824
docker gitlab-org allowed to fail manual
review-qa-all 5/5
passed #224466818
docker gitlab-org
review-qa-smoke

00:03:03

 
  Post Test
passed #224466828
gitlab-org
coverage

00:03:31

95.64%
passed #224466829
gitlab-org allowed to fail
flaky-examples-check

00:01:57

passed #224466827
gitlab-org
jsdoc

00:01:46

passed #224466826
gitlab-org
lint:javascript:report

00:01:01

 
  Post Cleanup
manual #224466830
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
sast Test
2019/06/03 22:19:47 exit status 1
2019/06/03 22:19:47 Container exited with non zero status code
Running after script...
$ date
Mon Jun 3 22:19:48 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
Time:        201.672s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Running after script...
$ date
Mon Jun 3 22:20:32 UTC 2019
Uploading artifacts...
gitlab-ui/tests/__image_snapshots__/: found 97 matching files
Uploading artifacts to coordinator... ok id=224466732 responseStatus=201 Created token=AzZTEsDq