Commit b9a9e69d authored by Shinya Maeda's avatar Shinya Maeda

Squashed commit of the following:

commit 1095f663
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 14:25:45 2018 +0900

    Fix spec

commit dd3e46ee
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 14:14:59 2018 +0900

    Fix static analysis

commit 32f46f40
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 11:34:05 2018 +0900

    Add spec for preventing N+1 querires. Add spec for merge request controller.

commit 7e12ef86
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 10:22:45 2018 +0900

    Add spec for test reports comparer serializer

commit 6d69bb29
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 09:27:41 2018 +0900

    Remove unnecessary comments

commit aca76ded
Merge: f6cf7c1c 9812e5dd
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 09:26:57 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit f6cf7c1c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 09:23:08 2018 +0900

    Use iid for making unique key for reactive cache

commit 642a3d92
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 23:39:14 2018 +0900

    Mkae reactive cache key unique per pipeline ids

commit 24ca3410
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 21:41:30 2018 +0900

    Add spec for entity

commit e761d9d3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 19:32:41 2018 +0900

    Add spec for merge request model

commit 3c740854
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 16:19:01 2018 +0900

    Add spec for build and pipeline model

commit 027a553b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 15:17:00 2018 +0900

    Add specs for test reports comparer

commit f4a63066
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 14:00:46 2018 +0900

    Add test_reports_spec

commit 18a285a5
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 11:16:57 2018 +0900

    Simpolify reactive cache usage. Improve code structure.

commit faaa41e5
Merge: 9a6b3b7f d799da4a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 09:19:26 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 9a6b3b7f
Merge: 04cd0ed8 b690c268
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 09:18:48 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit d799da4a
Merge: dc874468 04cd0ed8
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Jul 31 17:49:53 2018 +0100

    Merge branch 'artifact-format-v2-with-parser' of https://gitlab.com/gitlab-org/gitlab-ce into artifact-format-v2-with-parser

    * 'artifact-format-v2-with-parser' of https://gitlab.com/gitlab-org/gitlab-ce:
      Remove debuggable fixtures

commit dc874468
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Jul 31 17:49:35 2018 +0100

    Removes frontend code

commit 04cd0ed8
Merge: 80035402 0295e478
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 00:13:58 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 80035402
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 00:13:39 2018 +0900

    Remove debuggable fixtures

commit 0295e478
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Jul 31 16:12:25 2018 +0100

    Fixes broken tests

commit 4fa50ca7
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Jul 31 10:59:44 2018 +0100

    Ports EE css into CE code base
    Creates unit tests

    Creates code block component

commit 2dc45f71
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 18:20:22 2018 +0900

    Remove unnecessary parameters from build#each_test_report

commit 89d7398a
Merge: 08d6ac52 02e35a0d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 18:09:49 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit 08d6ac52
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 17:57:02 2018 +0900

    Add spec for test case and test suite

commit 9d6da7c9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 16:35:31 2018 +0900

    Add spec for gzip parser and adapter

commit 4c29079c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 11:41:33 2018 +0900

    Include status at each level. Refactor back to success/failed

commit 3fa747db
Merge: 4f7e9d54 69c87c3d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 10:18:51 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 4f7e9d54
Merge: 18ed3327 7758fdf1
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 10:18:18 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit 69c87c3d
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Mon Jul 30 15:58:11 2018 +0100

    Removes create issue handlers
    Hides grey block when no issues are present

commit 18ed3327
Merge: 05944862 2c15e359
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 23:14:44 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 05944862
Merge: c1bef2ee 3d2dad44
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 23:13:50 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit 2c15e359
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Mon Jul 30 11:14:48 2018 +0100

     Patched a weird status issue

commit 5a76071b
Merge: 6a2c69f8 c1bef2ee
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Mon Jul 30 11:14:06 2018 +0100

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit c1bef2ee
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 17:23:58 2018 +0900

    Add fixtures to check the behavior with multi patterns

commit b2ccce59
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 10:40:37 2018 +0900

    Fix a fixture in spec - merge request widget json

commit 29dfd452
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 10:35:34 2018 +0900

    Update old changes

commit c26dae72
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 10:26:39 2018 +0900

    Fix static analysis

commit e9ad9df3
Merge: fda5e9bd 1f999262
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 10:20:16 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit 6a2c69f8
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Fri Jul 27 15:54:02 2018 +0100

    Auto fixes with eslint

commit c7b9fa25
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Fri Jul 27 15:53:30 2018 +0100

    Updates the textGenerator for reports

commit fda5e9bd
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 27 16:20:15 2018 +0900

    Remove unnecessary schema change

commit 06e09675
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 27 16:06:28 2018 +0900

    Fix schema version

commit e63cc957
Merge: 8a734c3d 8b3c7f57
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 27 16:03:31 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit 0d613f03
Author: Sam Beckham <sbeckham@gitlab.com>
Date:   Thu Jul 26 16:24:48 2018 +0000

    Full list of vulnerabilities

commit 8a734c3d
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Thu Jul 26 17:20:07 2018 +0100

    Cherry picks an update to the report component and updates the codebase to use it

commit e16a2ddd
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 18:00:39 2018 +0100

    Adds the 'new' badge to the issues list

commit ac9bc3a2
Merge: f013f021 44904f34
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 16:44:25 2018 +0100

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit f013f021
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:47:30 2018 +0100

    Fixes some missed conflicts

commit 44904f34
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:47:30 2018 +0100

    Fixes a missed conflict

commit 735a4915
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:44:04 2018 +0100

    Fixes some merge conflicts

commit ef5c9a58
Merge: 181f98f6 8f3b9c0d
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:31:48 2018 +0100

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 181f98f6
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:27:48 2018 +0100

    Adds a proper check for loading errors

commit 24b108d4
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 14:09:57 2018 +0100

    Adds a fake conditional for checking if we should render the modal footer or not

commit 5f4b682a
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 13:43:24 2018 +0100

    Adds a patch to get this working again after the rebase

commit 0252d861
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:25:05 2018 +0900

    Skip comparison if head and base pipelines are the same as before

commit b8207fae
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:24:05 2018 +0900

    Fix N+1 problem at collect_test_reports

commit 297e51fe
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 21:00:03 2018 +0900

    Implement reactive cache worker

commit b20da289
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 16:58:56 2018 +0900

    Refactoring test_results to test_reports

commit f1cef584
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:12:58 2018 +0900

    Revert archive_metadata refactoring

commit c2387c53
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 22:57:01 2018 +0100

    Adds action to handle the create issue button
    Moves component to inside mr widget
    Fixes eslint errors

commit 761aec1d
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:57:10 2018 +0100

    Removes mocked data

commit da01a974
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:54:06 2018 +0100

    Render grouped test report in MR widget

commit 8a8678f5
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 13:15:35 2018 +0100

    Follow up after review: Clear Vuex actions and mutations

commit d84e1b0b
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 09:37:45 2018 +0100

    Moves payload to the correct action

commit 1a8490ff
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 16:10:25 2018 +0100

    Adds payload to the fetchReports success spec

commit b38389fa
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 14:48:54 2018 +0100

    Updates documentation and test mock endpoint

commit c6a1a39e
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 12:49:44 2018 +0100

    Adds Vuex store for reports section in MR widget

commit f0077c47
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 12:44:16 2018 +0100

    Initial structure for reports app

commit a76c5454
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:06:46 2018 +0900

    Check pipeline status at has_test_results?

commit 10475fab
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:19:46 2018 +0900

    Specify DOWNTIME=false

commit 6332df56
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:14:44 2018 +0900

    Wrap long lines

commit f507f19e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:05:31 2018 +0900

    Checking filr_format and file_type paring

commit 364242ee
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 16:07:21 2018 +0900

    Fix build presenter spec

commit 51491156
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 16:02:09 2018 +0900

    Erase test reports at the proper timing

commit cb70174f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:46:56 2018 +0900

    Make GENERAL_ARCHIVE_FILE_TYPE as a single entry

commit dceb8b58
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:42:16 2018 +0900

    Implement config artifact presenter

commit d492832d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 14:27:54 2018 +0900

    Introduce ARCHIVE_LEGACY_TRACES_MIGRATION_VERSION check

commit f432fd97
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 21:00:40 2018 +0900

    Revert unnecessary change

commit f83de3fe
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:57:03 2018 +0900

    Remove scattering around erase_test_reports!

commit 575be347
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:53:00 2018 +0900

    Rever archive_metadata refactoring  (For simplifying)

commit f04fc576
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:45:19 2018 +0900

    Use array_of_strings_or_string in Command

commit 1511f705
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:40:06 2018 +0900

    Fix spec

commit 78b3ba38
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:27:11 2018 +0900

    Fix presenter spec

commit ab583ce7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:23:41 2018 +0900

    Fix artifact migratable

commit d432f166
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:15:41 2018 +0900

    Increment migration version to use `file_format` when archiving traces

commit 7523168a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 17:57:15 2018 +0900

    Impolement job_artifact.test_reports method

commit 55b93405
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 16:49:27 2018 +0900

    Fix erase method

commit b98c907a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 16:28:00 2018 +0900

    Fix spec

commit 49d196a0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 15:31:42 2018 +0900

    Add java ant Junit test report in fixtures

commit 292e10b9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 20:59:01 2018 +0900

    Add fixtures which can export all kind of reports (new/resolved/exisiting)

commit b59d68c9
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Wed Jul 18 12:17:49 2018 +0200

    Add summary to test results json

commit 67137d61
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 16:43:20 2018 +0900

    Fix fixtures for development

commit 2184358c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 15:43:28 2018 +0900

    Evaluate artifact_format

commit 618e0230
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 18:00:59 2018 +0200

    Expose all data with API on Merge Request

commit 0b5f9ff7
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 17:18:19 2018 +0200

    Improve code of JUnit reports

commit 5fa026db
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 20:13:31 2018 +0900

    Refactoring suites. Adding gurad clause at collect_test_results

commit b4dcab7b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 19:52:01 2018 +0900

    Implement comprare failed tests

commit 4f3c9f15
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 18:50:03 2018 +0900

    Objectize each test suit and summary

commit 1477d1a0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 17:55:34 2018 +0900

    Pass build.group_name as testsuite name

commit 26d0d366
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 16:35:06 2018 +0900

    Remove unnecessary files

commit 00487d2d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 16:26:37 2018 +0900

    Add parser and testresults

commit 33c42f21
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 22:27:46 2018 +0900

    Fix sending junit.xml

commit a53aa653
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 19:02:06 2018 +0900

    Add spec for Gitlab::Ci::Config::Entry::Artifacts

commit d4f837fe
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:58:28 2018 +0900

    Revert refactoring

commit c4223e29
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:57:31 2018 +0900

    Revert refactoring

commit 3a50b86d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:55:41 2018 +0900

    Add spec for file format. Add spec for config_artifacts

commit 0dd37009
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:20:28 2018 +0900

    Add file_format to factory

commit 4db135e3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:12:52 2018 +0900

    Rename migration file properly

commit 0f7a011a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:09:57 2018 +0900

    Revert artifacts_archive_file refactoring

commit cd3d10e5
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 16:03:26 2018 +0900

    Dry up the converion in Entry::Reports

commit cab90b2a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 15:50:42 2018 +0900

    Set file_format at callers

commit 50780a66
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 15:47:51 2018 +0900

    Use presenter for presenting artifacts hash to runner

commit e6310b51
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 14:59:09 2018 +0900

    Support deleting junit artifact. Make wording explicit

commit 0eb356b9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 14:35:12 2018 +0900

    Add changelog

commit 35f350d1
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 17:33:07 2018 +0900

    Fix static analysis

commit 2db42fd6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 16:43:02 2018 +0900

    Fix Config::Entry::Artifacts

commit fa73365d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 14:40:20 2018 +0900

    Generalized by DEFAULT_FILE_FORMAT

commit ac76ad67
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 13:55:02 2018 +0900

    Cleanup API::Entities::JobRequest::Artifacts

commit 32d25b13
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 13:25:52 2018 +0900

    Simplified file_type relations

commit b62faddf
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 18:16:52 2018 +0900

    Remove unnecessary change

commit 314ac2ba
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 17:41:35 2018 +0900

    Add gzip XML parser

commit 37cbfbde
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 17:40:35 2018 +0900

    Fix errors typo

commit 2dc2d704
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:32:35 2018 +0900

    Use the correct type name

commit 66edd04c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:29:21 2018 +0900

    Refactor job_artifacts_metadata to job_artifacts_archive_metadata

commit d586f030
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:23:55 2018 +0900

    Add job_artifacts_junit relation

commit 58aef7a7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:14:03 2018 +0900

    Fix raw to raw?

commit f14e1b19
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 19:05:51 2018 +0900

    Temporaly use type Hash for reports

commit 05e4967a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:27:21 2018 +0900

    Revert unnecessary change

commit 8a7267c7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:21:46 2018 +0900

    Use file_format raw for trace

commit ca6820a7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:20:10 2018 +0900

    Check the presence of the file_format

commit 9c78003f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:16:19 2018 +0900

    Add format_restriction validation

commit 9168513e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 20:23:54 2018 +0900

    Artifacts presenter (Halfway)

commit d83cf216
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 20:22:52 2018 +0900

    Fix schema.rb

commit e64af496
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:26:03 2018 +0900

    Allow reports type under artifacts. Allow junit keyword in it.

commit 20c333c9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:25:10 2018 +0900

    Change column name to artifact_format

commit 16b670f4
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 18:02:21 2018 +0900

    Rename metadata to archive_metadata, and compress to file_format

commit 808355fa
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 17:47:18 2018 +0900

    Validate compression. Clean up schema

commit 8e204860
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 5 19:06:54 2018 +0900

    Make compression params at the first level

commit 3331af0a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 5 16:31:03 2018 +0900

    Reorganize components

commit 8f3b9c0d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:25:05 2018 +0900

    Skip comparison if head and base pipelines are the same as before

commit 9cabd787
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:24:05 2018 +0900

    Fix N+1 problem at collect_test_reports

commit 21de18bf
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 21:00:03 2018 +0900

    Implement reactive cache worker

commit 09c2fa31
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 16:58:56 2018 +0900

    Refactoring test_results to test_reports

commit 41a439c7
Merge: bc959fff 7105b37a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:23:29 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit bc959fff
Merge: 291a9236 1ebaaaf2
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:23:01 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit 1ebaaaf2
Merge: bfdf5658 dc7b4b7b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:22:29 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2

commit 291a9236
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:12:58 2018 +0900

    Revert archive_metadata refactoring

commit 7105b37a
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 22:57:01 2018 +0100

    Adds action to handle the create issue button
    Moves component to inside mr widget
    Fixes eslint errors

commit d82efd8f
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:57:10 2018 +0100

    Removes mocked data

commit 5cfe9900
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:54:06 2018 +0100

    Render grouped test report in MR widget

commit 8e74f14c
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 13:15:35 2018 +0100

    Follow up after review: Clear Vuex actions and mutations

commit 570e7713
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 09:37:45 2018 +0100

    Moves payload to the correct action

commit 04b473b6
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 16:10:25 2018 +0100

    Adds payload to the fetchReports success spec

commit a3eb4001
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 14:48:54 2018 +0100

    Updates documentation and test mock endpoint

commit 920b74f5
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Thu Jul 19 12:49:44 2018 +0100

    Adds Vuex store for reports section in MR widget

commit ebebf404
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 12:44:16 2018 +0100

    Initial structure for reports app

commit 746c260d
Merge: 82a8d557 bfdf5658
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:15:32 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit bfdf5658
Merge: 681bd6a8 44dbeccb
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:10:47 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2

commit 82a8d557
Merge: b2183151 44dbeccb
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:07:30 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit b2183151
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:06:46 2018 +0900

    Check pipeline status at has_test_results?

commit 681bd6a8
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:19:46 2018 +0900

    Specify DOWNTIME=false

commit 59c4e313
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:14:44 2018 +0900

    Wrap long lines

commit 3d85788e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 18:05:31 2018 +0900

    Checking filr_format and file_type paring

commit 3c92a22f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 16:07:21 2018 +0900

    Fix build presenter spec

commit 36e69897
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 16:02:09 2018 +0900

    Erase test reports at the proper timing

commit 402ae97e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:46:56 2018 +0900

    Make GENERAL_ARCHIVE_FILE_TYPE as a single entry

commit 75f75b3f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:42:16 2018 +0900

    Implement config artifact presenter

commit 9ecaee91
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 14:27:54 2018 +0900

    Introduce ARCHIVE_LEGACY_TRACES_MIGRATION_VERSION check

commit 34ea9610
Merge: d88523ca b60364c0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 13:46:52 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2

commit d88523ca
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 21:00:40 2018 +0900

    Revert unnecessary change

commit d9beb10e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:57:03 2018 +0900

    Remove scattering around erase_test_reports!

commit c79f361c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:53:00 2018 +0900

    Rever archive_metadata refactoring  (For simplifying)

commit 55bc71a4
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:45:19 2018 +0900

    Use array_of_strings_or_string in Command

commit 8a576b18
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 20:40:06 2018 +0900

    Fix spec

commit a2cda62f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:27:11 2018 +0900

    Fix presenter spec

commit 95502e60
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:23:41 2018 +0900

    Fix artifact migratable

commit a3930853
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 18:15:41 2018 +0900

    Increment migration version to use `file_format` when archiving traces

commit e31121cb
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 17:57:15 2018 +0900

    Impolement job_artifact.test_reports method

commit e54707fd
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 16:49:27 2018 +0900

    Fix erase method

commit 20e95824
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 16:28:00 2018 +0900

    Fix spec

commit be2083ff
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 15:31:42 2018 +0900

    Add java ant Junit test report in fixtures

commit d47efe84
Merge: e0dc7d97 7ade4981
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 12:37:57 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit 7ade4981
Merge: e7be6b2b 98eccfc4
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 12:37:22 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2

commit e0dc7d97
Merge: 26578902 1859a0f9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 20:59:20 2018 +0900

    Merge branch 'artifact-format-v2-with-parser' of gitlab.com:gitlab-org/gitlab-ce into artifact-format-v2-with-parser

commit 26578902
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 20:59:01 2018 +0900

    Add fixtures which can export all kind of reports (new/resolved/exisiting)

commit 1859a0f9
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Wed Jul 18 12:17:49 2018 +0200

    Add summary to test results json

commit 47dfdc73
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 16:43:20 2018 +0900

    Fix fixtures for development

commit 8b761adf
Merge: 84c64a79 e7be6b2b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 15:44:10 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit e7be6b2b
Merge: 5a8d4930 9bdc9b1a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 15:43:36 2018 +0900

    Merge branch 'master' into artifact-format-v2

commit 5a8d4930
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 15:43:28 2018 +0900

    Evaluate artifact_format

commit 84c64a79
Merge: e2670a3c 9bdc9b1a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 13:28:42 2018 +0900

    Merge branch 'master-ce' into artifact-format-v2-with-parser

commit e2670a3c
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 18:00:59 2018 +0200

    Expose all data with API on Merge Request

commit 5ea46ce5
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 17:18:19 2018 +0200

    Improve code of JUnit reports

commit 0553827f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 20:13:31 2018 +0900

    Refactoring suites. Adding gurad clause at collect_test_results

commit 55edde40
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 19:52:01 2018 +0900

    Implement comprare failed tests

commit 612c44a3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 18:50:03 2018 +0900

    Objectize each test suit and summary

commit 598b3407
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 17:55:34 2018 +0900

    Pass build.group_name as testsuite name

commit d0ad35fc
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 16:35:06 2018 +0900

    Remove unnecessary files

commit 541292c3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 16:26:37 2018 +0900

    Add parser and testresults

commit c61465b9
Merge: da6e141e c3ce06aa
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 22:28:12 2018 +0900

    Merge branch 'artifact-format-v2' into artifact-format-v2-with-parser

commit c3ce06aa
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 22:27:46 2018 +0900

    Fix sending junit.xml

commit e5ce3668
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 19:02:06 2018 +0900

    Add spec for Gitlab::Ci::Config::Entry::Artifacts

commit ede107ca
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:58:28 2018 +0900

    Revert refactoring

commit 15531ba9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:57:31 2018 +0900

    Revert refactoring

commit 14821f3b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:55:41 2018 +0900

    Add spec for file format. Add spec for config_artifacts

commit 882faeab
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:20:28 2018 +0900

    Add file_format to factory

commit 3cd0513e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:12:52 2018 +0900

    Rename migration file properly

commit f511933b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:09:57 2018 +0900

    Revert artifacts_archive_file refactoring

commit e295e8cb
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 16:03:26 2018 +0900

    Dry up the converion in Entry::Reports

commit b0ffa42f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 15:50:42 2018 +0900

    Set file_format at callers

commit f3dc7a2e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 15:47:51 2018 +0900

    Use presenter for presenting artifacts hash to runner

commit e5299526
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 14:59:09 2018 +0900

    Support deleting junit artifact. Make wording explicit

commit cc81c34a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 14:35:12 2018 +0900

    Add changelog

commit abde0f2a
Merge: 4c87e5b3 fabf6a56
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 13:22:22 2018 +0900

    Merge branch 'master' into artifact-format-v2

commit 4c87e5b3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 17:33:07 2018 +0900

    Fix static analysis

commit bc96346b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 16:43:02 2018 +0900

    Fix Config::Entry::Artifacts

commit aac28461
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 14:40:20 2018 +0900

    Generalized by DEFAULT_FILE_FORMAT

commit a79299fd
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 13:55:02 2018 +0900

    Cleanup API::Entities::JobRequest::Artifacts

commit 16502492
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 13:25:52 2018 +0900

    Simplified file_type relations

commit 981da91b
Merge: e7980842 924146a8
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 13 13:18:20 2018 +0900

    Merge branch 'master' into artifact-format-v2

commit e7980842
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 18:16:52 2018 +0900

    Remove unnecessary change

commit da6e141e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 17:41:35 2018 +0900

    Add gzip XML parser

commit a531bd74
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 17:40:35 2018 +0900

    Fix errors typo

commit 57d6f218
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:32:35 2018 +0900

    Use the correct type name

commit da4ca63f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:29:21 2018 +0900

    Refactor job_artifacts_metadata to job_artifacts_archive_metadata

commit 4098a8f1
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:23:55 2018 +0900

    Add job_artifacts_junit relation

commit 5342f07e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:14:03 2018 +0900

    Fix raw to raw?

commit 15e0abcb
Merge: 31252fe8 ba38931d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:12:38 2018 +0900

    Merge branch 'master' into artifact-format-v2

commit 31252fe8
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 19:05:51 2018 +0900

    Temporaly use type Hash for reports

commit 583165c0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:27:21 2018 +0900

    Revert unnecessary change

commit eb48369b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:21:46 2018 +0900

    Use file_format raw for trace

commit fb69ae83
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:20:10 2018 +0900

    Check the presence of the file_format

commit c0840224
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:16:19 2018 +0900

    Add format_restriction validation

commit d64fbd38
Merge: 7ec81e7c c2a0a3ab
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:11:44 2018 +0900

    Merge branch 'master' into artifact-format-v2

commit 7ec81e7c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 20:23:54 2018 +0900

    Artifacts presenter (Halfway)

commit a3ccbe4c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 20:22:52 2018 +0900

    Fix schema.rb

commit b630c670
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:26:03 2018 +0900

    Allow reports type under artifacts. Allow junit keyword in it.

commit e7e37612
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:25:10 2018 +0900

    Change column name to artifact_format

commit f3f25d56
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 18:02:21 2018 +0900

    Rename metadata to archive_metadata, and compress to file_format

commit d7e07093
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 17:47:18 2018 +0900

    Validate compression. Clean up schema

commit beb5990e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 5 19:06:54 2018 +0900

    Make compression params at the first level

commit 1e2e1c0d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 5 16:31:03 2018 +0900

    Reorganize components
parent 9812e5dd
import Visibility from 'visibilityjs';
import $ from 'jquery';
import axios from '../../lib/utils/axios_utils';
import Poll from '../../lib/utils/poll';
import * as types from './mutation_types';
......@@ -63,5 +64,13 @@ export const receiveReportsSuccess = ({ commit }, response) =>
export const receiveReportsError = ({ commit }) => commit(types.RECEIVE_REPORTS_ERROR);
export const openModal = ({ dispatch }, payload) => {
dispatch('setModalData', payload);
$('#modal-mrwidget-reports').modal('show');
};
export const setModalData = ({ commit }, payload) => commit(types.SET_ISSUE_MODAL_DATA, payload);
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export default () => {};
......@@ -99,6 +99,21 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
}
end
def test_reports
result = @merge_request.compare_test_reports
case result[:status]
when :parsing
render json: '', status: :no_content
when :parsed
render json: result[:data], status: :ok
when :error
render json: { status_reason: result[:status_reason] }, status: :bad_request
else
render json: { status_reason: 'Unknown error' }, status: :internal_server_error
end
end
def edit
define_edit_vars
end
......
......@@ -69,6 +69,11 @@ module Ci
where('NOT EXISTS (?)', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id').trace)
end
scope :with_test_reports, ->() do
includes(:job_artifacts_junit) # Prevent N+1 problem when iterating each ci_job_artifact row
.where('EXISTS (?)', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id').test_reports)
end
scope :with_artifacts_stored_locally, -> { with_artifacts_archive.where(artifacts_file_store: [nil, LegacyArtifactUploader::Store::LOCAL]) }
scope :with_artifacts_not_expired, ->() { with_artifacts_archive.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
scope :with_expired_artifacts, ->() { with_artifacts_archive.where('artifacts_expire_at < ?', Time.now) }
......@@ -627,8 +632,31 @@ module Ci
running? && runner_session_url.present?
end
def collect_test_reports!(test_reports)
raise ArgumentError, 'build does not have test reports' unless has_test_reports?
test_reports.get_suite(group_name).tap do |test_suite|
each_test_report do |file_type, blob|
parse_test_report!(test_suite, file_type, blob)
end
end
end
private
def each_test_report
Ci::JobArtifact::TEST_REPORT_FILE_TYPES.each do |file_type|
public_send("job_artifacts_#{file_type}").each_blob do |blob| # rubocop:disable GitlabSecurity/PublicSend
yield file_type, blob
end
end
end
def parse_test_report!(test_suite, file_type, blob)
"Gitlab::Ci::Parsers::#{file_type.capitalize}Parser".constantize
.new(blob).parse!(test_suite)
end
def update_artifacts_size
self.artifacts_size = legacy_artifacts_file&.size
end
......
......@@ -4,6 +4,8 @@ module Ci
include ObjectStorage::BackgroundMove
extend Gitlab::Ci::Model
NotSupportedAdapterError = Class.new(StandardError)
TEST_REPORT_FILE_TYPES = %w[junit].freeze
DEFAULT_FILE_NAMES = { junit: 'junit.xml' }.freeze
TYPE_AND_FORMAT_PAIRS = { archive: :zip, metadata: :gzip, trace: :raw, junit: :gzip }.freeze
......@@ -44,6 +46,10 @@ module Ci
gzip: 3
}
FILE_FORMAT_ADAPTERS = {
gzip: Gitlab::Ci::Build::Artifacts::GzipFileAdapter
}.freeze
def valid_file_format?
unless TYPE_AND_FORMAT_PAIRS[self.file_type&.to_sym] == self.file_format&.to_sym
errors.add(:file_format, 'Invalid file format with specified file type')
......@@ -75,8 +81,22 @@ module Ci
end
end
def each_blob(&blk)
unless file_format_adapter_class
raise NotSupportedAdapterError, 'This file format requires a dedicated adapter'
end
file.open do |stream|
file_format_adapter_class.new(stream).each_blob(&blk)
end
end
private
def file_format_adapter_class
FILE_FORMAT_ADAPTERS[file_format.to_sym]
end
def set_size
self.size = file.size
end
......
......@@ -603,6 +603,18 @@ module Ci
@latest_builds_with_artifacts ||= builds.latest.with_artifacts_archive.to_a
end
def has_test_reports?
complete? && builds.with_test_reports.any?
end
def test_reports
Gitlab::Ci::Reports::TestReports.new.tap do |test_reports|
builds.with_test_reports.each do |build|
build.collect_test_reports!(test_reports)
end
end
end
private
def ci_yaml_from_repo
......
......@@ -11,6 +11,11 @@ class MergeRequest < ActiveRecord::Base
include ThrottledTouch
include Gitlab::Utils::StrongMemoize
include LabelEventable
include ReactiveCaching
self.reactive_cache_key = ->(model) { [model.project.id, model.iid] }
self.reactive_cache_refresh_interval = 1.hour
self.reactive_cache_lifetime = 1.hour
ignore_column :locked_at,
:ref_fetched,
......@@ -1010,6 +1015,40 @@ class MergeRequest < ActiveRecord::Base
.order(id: :desc)
end
def has_test_reports?
actual_head_pipeline&.has_test_reports?
end
def compare_test_reports
unless actual_head_pipeline && actual_head_pipeline.has_test_reports?
return { status: :error, status_reason: 'head pipeline does not have test reports' }
end
with_reactive_cache(base_pipeline&.iid, actual_head_pipeline.iid) { |data| data } || { status: :parsing }
end
def calculate_reactive_cache(base_pipeline_iid, head_pipeline_iid)
begin
if base_pipeline_iid
base_pipeline, head_pipeline = project.pipelines.where(iid: [base_pipeline_iid, head_pipeline_iid]).all
else
head_pipeline = project.pipelines.find(iid: head_pipeline_iid)
end
comparer = Gitlab::Ci::Reports::TestReportsComparer
.new(base_pipeline&.test_reports, head_pipeline.test_reports)
{
status: :parsed,
data: TestReportsComparerSerializer
.new(project: project)
.represent(comparer).to_json
}
rescue => e
{ status: :error, status_reason: e.message }
end
end
def all_commits
# MySQL doesn't support LIMIT in a subquery.
diffs_relation = if Gitlab::Database.postgresql?
......@@ -1122,6 +1161,12 @@ class MergeRequest < ActiveRecord::Base
true
end
def base_pipeline
@base_pipeline ||= project.pipelines
.order(id: :desc)
.find_by(sha: diff_base_sha)
end
def discussions_rendered_on_frontend?
true
end
......
......@@ -231,6 +231,12 @@ class MergeRequestWidgetEntity < IssuableEntity
end
end
expose :test_reports_path do |merge_request|
if merge_request.has_test_reports?
test_reports_project_merge_request_path(merge_request.project, merge_request, format: :json)
end
end
private
delegate :current_user, to: :request
......
class TestCaseEntity < Grape::Entity
expose :status
expose :name
expose :execution_time
expose :system_output
expose :stack_trace
end
class TestReportsComparerEntity < Grape::Entity
expose :total_status, as: :status
expose :summary do
expose :total_count, as: :total
expose :resolved_count, as: :resolved
expose :failed_count, as: :failed
end
expose :suite_comparers, as: :suites, using: TestSuiteComparerEntity
end
class TestReportsComparerSerializer < BaseSerializer
entity TestReportsComparerEntity
end
class TestSuiteComparerEntity < Grape::Entity
expose :name
expose :total_status, as: :status
expose :summary do
expose :total_count, as: :total
expose :resolved_count, as: :resolved
expose :failed_count, as: :failed
end
expose :new_failures, using: TestCaseEntity
expose :resolved_failures, using: TestCaseEntity
expose :existing_failures, using: TestCaseEntity
end
......@@ -109,6 +109,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
post :assign_related_issues
get :discussions, format: :json
post :rebase
get :test_reports
scope constraints: { format: nil }, action: :show do
get :commits, defaults: { tab: 'commits' }
......
......@@ -30,6 +30,8 @@ class Gitlab::Seeder::Pipelines
queued_at: 8.hour.ago, started_at: 8.hour.ago, finished_at: 7.hour.ago },
{ name: 'spinach:osx', stage: 'test', status: :failed, allow_failure: true,
queued_at: 8.hour.ago, started_at: 8.hour.ago, finished_at: 7.hour.ago },
{ name: 'java ant', stage: 'test', status: :failed, allow_failure: true,
queued_at: 8.hour.ago, started_at: 8.hour.ago, finished_at: 7.hour.ago },
# deploy stage
{ name: 'staging', stage: 'deploy', environment: 'staging', status_event: :success,
......@@ -41,7 +43,7 @@ class Gitlab::Seeder::Pipelines
when: 'manual', status: :skipped },
# notify stage
{ name: 'slack', stage: 'notify', when: 'manual', status: :created },
{ name: 'slack', stage: 'notify', when: 'manual', status: :success },
]
EXTERNAL_JOBS = [
{ name: 'jenkins', stage: 'test', status: :success,
......@@ -54,16 +56,10 @@ class Gitlab::Seeder::Pipelines
def seed!
pipelines.each do |pipeline|
begin
BUILDS.each { |opts| build_create!(pipeline, opts) }
EXTERNAL_JOBS.each { |opts| commit_status_create!(pipeline, opts) }
print '.'
rescue ActiveRecord::RecordInvalid
print 'F'
ensure
pipeline.update_duration
pipeline.update_status
end
BUILDS.each { |opts| build_create!(pipeline, opts) }
EXTERNAL_JOBS.each { |opts| commit_status_create!(pipeline, opts) }
pipeline.update_duration
pipeline.update_status
end
end
......@@ -87,7 +83,9 @@ class Gitlab::Seeder::Pipelines
branch = merge_request.source_branch
merge_request.commits.last(4).map do |commit|
create_pipeline!(project, branch, commit)
create_pipeline!(project, branch, commit).tap do |pipeline|
merge_request.update!(head_pipeline_id: pipeline.id)
end
end
end
......@@ -98,7 +96,7 @@ class Gitlab::Seeder::Pipelines
def create_pipeline!(project, ref, commit)
project.pipelines.create(sha: commit.id, ref: ref, source: :push)
project.pipelines.create!(sha: commit.id, ref: ref, source: :push)
end
def build_create!(pipeline, opts = {})
......@@ -110,25 +108,50 @@ class Gitlab::Seeder::Pipelines
# (id required), that is why we need `#tap` method instead of passing
# block directly to `Ci::Build#create!`.
setup_artifacts(build)
setup_artifacts(build) if %w[build test].include?(build.stage)
setup_test_reports(build) if %w[test].include?(build.stage)
setup_build_log(build)
build.project.environments.
find_or_create_by(name: build.expanded_environment_name)
build.save
build.save!
end
end
def setup_artifacts(build)
return unless %w[build test].include?(build.stage)
artifacts_cache_file(artifacts_archive_path) do |file|
build.job_artifacts.build(project: build.project, file_type: :archive, file: file)
build.job_artifacts.build(project: build.project, file_type: :archive, file_format: :zip, file: file)
end
artifacts_cache_file(artifacts_metadata_path) do |file|
build.job_artifacts.build(project: build.project, file_type: :metadata, file: file)
build.job_artifacts.build(project: build.project, file_type: :metadata, file_format: :gzip, file: file)
end
end
def setup_test_reports(build)
if build.ref == build.project.default_branch
if build.name.include?('rspec:linux')
artifacts_cache_file(artifacts_rspec_junit_master_path(build.name)) do |file|
build.job_artifacts.build(project: build.project, file_type: :junit, file_format: :gzip, file: file)
end
elsif build.name.include?('java ant')
artifacts_cache_file(artifacts_ant_junit_master_path) do |file|
build.job_artifacts.build(project: build.project, file_type: :junit, file_format: :gzip, file: file)
end
end
else
if build.name.include?('rspec:linux')
artifacts_rspec_junit_feature_path(build.name).try do |path|
artifacts_cache_file(path) do |file|
build.job_artifacts.build(project: build.project, file_type: :junit, file_format: :gzip, file: file)
end
end
elsif build.name.include?('java ant')
artifacts_cache_file(artifacts_ant_junit_feature_path) do |file|
build.job_artifacts.build(project: build.project, file_type: :junit, file_format: :gzip, file: file)
end
end
end
end
......@@ -171,13 +194,31 @@ class Gitlab::Seeder::Pipelines
Rails.root + 'spec/fixtures/ci_build_artifacts_metadata.gz'
end
def artifacts_rspec_junit_master_path(build_name)
index, total = build_name.scan(/ (\d) (\d)/).first
Rails.root + "spec/fixtures/junit/junit_master_rspec_#{index}_#{total}.xml.gz"
end
def artifacts_rspec_junit_feature_path(build_name)
index, total = build_name.scan(/ (\d) (\d)/).first
Rails.root + "spec/fixtures/junit/junit_feature_rspec_#{index}_#{total}.xml.gz"
end
def artifacts_ant_junit_master_path
Rails.root + "spec/fixtures/junit/junit_master_ant.xml.gz"
end
def artifacts_ant_junit_feature_path
Rails.root + "spec/fixtures/junit/junit_feature_ant.xml.gz"
end
def artifacts_cache_file(file_path)
cache_path = file_path.to_s.gsub('ci_', "p#{@project.id}_")
file = Tempfile.new("artifacts")
file.close
FileUtils.copy(file_path, cache_path)
File.open(cache_path) do |file|
yield file
end
FileUtils.copy(file_path, file.path)
yield(UploadedFile.new(file.path, filename: File.basename(file_path)))
end
end
......
module Gitlab
module Ci
module Build
module Artifacts
class GzipFileAdapter
attr_reader :stream
InvalidStreamError = Class.new(StandardError)
def initialize(stream)
raise InvalidStreamError, "Stream is required" unless stream
@stream = stream
end
def each_blob
stream.seek(0)
until stream.eof?
gzip(stream) do |gz|
yield gz.read, gz.orig_name
unused = gz.unused&.length.to_i
# pos has already reached to EOF at the moment
# We rewind the pos to the top of unused files
# to read next gzip stream, to support multistream archives
# https://golang.org/src/compress/gzip/gunzip.go#L117
stream.seek(-unused, IO::SEEK_CUR)
end
end
end
private
def gzip(stream, &block)
gz = Zlib::GzipReader.new(stream)
yield(gz)
rescue Zlib::Error => e
raise InvalidStreamError, e.message
ensure
gz&.finish
end
end
end
end
end
end
module Gitlab
module Ci
module Parsers
class JunitParser
attr_reader :data
JunitParserError = Class.new(StandardError)
def initialize(xml_data)
@data = Hash.from_xml(xml_data)
rescue
raise JunitParserError, 'Invalid XML data'
end
def parse!(test_suite)
each_suite do |testcases|
testcases.each do |testcase|
test_case = create_test_case(testcase)
test_suite.add_test_case(test_case)
end
end
rescue
raise JunitParserError, 'Invalid JUnit xml structure'
end
private
def each_suite
testsuites.each do |testsuite|
yield testcases(testsuite)
end
end
def testsuites
if data['testsuites']
data['testsuites']['testsuite']
else
[data['testsuite']]
end
end
def testcases(testsuite)
if testsuite['testcase'].is_a?(Array)
testsuite['testcase']
else
[testsuite['testcase']]
end
end
def create_test_case(data)
if data['failure']
status = ::Gitlab::Ci::Reports::TestCase::STATUS_FAILED
system_output = data['failure']
else
status = ::Gitlab::Ci::Reports::TestCase::STATUS_SUCCESS
system_output = nil
end
::Gitlab::Ci::Reports::TestCase.new(
classname: data['classname'],
name: data['name'],
file: data['file'],
execution_time: data['time'],
status: status,
system_output: system_output
)
end
end
end
end
end
module Gitlab
module Ci
module Reports
class TestCase
STATUS_SUCCESS = 'success'.freeze
STATUS_FAILED = 'failed'.freeze
STATUS_SKIPPED = 'skipped'.freeze
STATUS_ERROR = 'error'.freeze
STATUS_TYPES = [STATUS_SUCCESS, STATUS_FAILED, STATUS_SKIPPED, STATUS_ERROR].freeze
attr_reader :name, :classname, :execution_time, :status, :file, :system_output, :stack_trace, :key
def initialize(name:, classname:, execution_time:, status:, file: nil, system_output: nil, stack_trace: nil)
@name = name
@classname = classname