Commit Graph

954 Commits

Author SHA1 Message Date
Felipe Artur e2aa332504 Improve batch size 2019-02-12 16:39:56 -02:00
Felipe Artur e9b84f50e9 Migrate issuable states to integer patch 1
Patch 1 that migrates issues/merge requests states from integer to string.
On this commit we are only adding the state_id column and syncing it with a backgroud migration.

On Patch 2 the code to use the new integer column will be deployed and the old column will be
removed.
2019-02-11 15:48:40 -02:00
Luke Duncalfe 2b7dd017af Allow custom squash commit messages 2019-02-06 12:33:11 +00:00
Mario de la Ossa 49c74068ae
Save sorting preference for Issues/MRs in BE
In order to let users' sorting preferences transfer between devices, we
save the preference for issues and MRs (one preference for issues, one
for MRs) in the backend inside the UserPreference object
2019-01-28 12:48:05 -06:00
Douwe Maan 8c1991b9bb Merge branch 'osw-fix-quick-suggestion-application-being-reverted' into 'master'
Adjust applied suggestion reverting previous changes

Closes #56017

See merge request gitlab-org/gitlab-ce!24250
2019-01-14 13:46:05 +00:00
Oswaldo Ferreira 6e29368118 Adjust applied suggestion reverting previous changes
1. Avoid suggestions being applied on the same file
from reverting previous changes
2. Gracefully use and handle file changes error
when updating the file (though, it does not totally
solves the sync problem for multiple suggestion
applications at once)
2019-01-11 21:35:07 -02:00
Shinya Maeda 1c248cd47c Fix unexpected exception by failed to find an actual head pipeline
Add changelog
2019-01-10 14:02:43 +09:00
Tiago Botelho a2842241d4
Add committers and authors methods on MergeRequest
These are used by the EE-only approvers feature
2019-01-08 00:27:29 +01:00
Shinya Maeda b6a9dce14e Make find_actual_head_pipeline private method
a
2019-01-04 19:38:45 +09:00
Shinya Maeda 0d9b801a5f Refactor the logic of updating head pipelines
Sort out some logic
2019-01-04 19:36:45 +09:00
Kamil Trzciński 7ebd36e302 Prefer to use after_transition
Before_transition does not play nice when used with
OptimisticLocking and this can result in triggering
multiple events

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/55306
2019-01-02 19:02:46 +01:00
Oswaldo Ferreira 7cf4947792 Cache diff highlight in discussions
This commit handles note diffs caching, which considerably improves
the performance on merge requests with lots of comments.
Important to note that the caching approach taken here is different
from `Gitlab::Diff::HighlightCache`. We do not reset the whole cache
when a new push is sent or anything else. That's because discussions
diffs are persisted and do not change.
2018-12-21 16:59:21 -02:00
Douwe Maan 58ee1746a8 Merge branch 'osw-revert-suggestions-ff' into 'master'
Remove feature flag for suggest changes feature

See merge request gitlab-org/gitlab-ce!23892
2018-12-18 15:42:34 +00:00
Oswaldo Ferreira ee425c9cf8 Remove feature flag for suggest changes feature 2018-12-18 11:18:21 -02:00
Jasper Maes 0d1922dd7c Passing an argument to force an association to reload is now deprecated 2018-12-18 13:17:51 +01:00
Oswaldo Ferreira ed3034bbb7 Allow suggesting single line changes in diffs 2018-12-13 19:17:19 +00:00
Gilbert Roulot e6226e8cb3 Generalise test compare service
It adds a base class for CompareTestReportsService
containing common code with CompareLicenseManagementReportsService
which is present in GitLab Enterprise Edition.
2018-12-11 11:39:22 +01:00
Stan Hu 1bd7f7cb20 Revert "Merge branch '28682-can-merge-branch-before-build-is-started' into 'master'"
This reverts commit 793be43b35, reversing
changes made to 8d0b4872ba.

For projects not using any CI, enabling merge only when pipeline succeeds
caused merge requests to be in unmergeable state, which caused significant
confusion.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/55144 for more details.
2018-12-10 21:18:24 -08:00
Nick Thomas 4d801a70fb
Inline the new checks into normal update error handling 2018-12-07 12:31:36 +00:00
Akos Gyimesi 4a31c6778d
Link to conflicting MR in reopening error message
Also, the error message became shorter.
2018-12-06 17:20:08 +00:00
Akos Gyimesi 5fd5dad492
Improve error message when attempting to reopen MR and there's a new open MR for the same branch 2018-12-06 17:20:08 +00:00
Shinya Maeda fab30c117b Expose merge request pipeline variables
Introduce the following variables

- CI_MERGE_REQUEST_ID
- CI_MERGE_REQUEST_IID
- CI_MERGE_REQUEST_REF_PATH
- CI_MERGE_REQUEST_PROJECT_ID
- CI_MERGE_REQUEST_PROJECT_PATH
- CI_MERGE_REQUEST_PROJECT_URL
- CI_MERGE_REQUEST_TARGET_BRANCH_NAME
- CI_MERGE_REQUEST_SOURCE_PROJECT_ID
- CI_MERGE_REQUEST_SOURCE_PROJECT_PATH
- CI_MERGE_REQUEST_SOURCE_PROJECT_URL
- CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
2018-12-06 21:53:23 +09:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Shinya Maeda e62bfc7817 Merge request pipelines 2018-12-05 15:57:52 +09:00
Matija Čupić 949cc27ac4
Strictly require a pipeline to merge 2018-11-08 13:52:19 +01:00
Mark Chao 67b579c54e Allow getting all paths (old & new) involved in MR
Fetch database columns directly if available
2018-11-07 11:28:43 +08:00
Stan Hu dbc03ce3a9 Optimize merge request refresh by using the database to check commit SHAs
Previously for a given merge request, we would:

1. Create the array of commit SHAs involved in the push (A)
2. Request all merge request commits and map the SHA (B)
3. Reload the diff if there were any common commits between A and B

We can avoid additional database querying and overhead by
checking with the database whether the merge request contains any
of the commit SHAs.

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/53213
2018-11-02 12:11:30 -07:00
Alessio Caiazza dadc046d3a post merge pipeline and environments status 2018-10-29 11:34:41 +00:00
Chantal Rollison 38f3d59fd0 #13650 added wip search functionality and tests 2018-10-03 08:15:00 +00:00
Tiago Botelho 81d949f656 Applies the CE backport of EE#657 2018-09-24 12:02:01 +01:00
Yorick Peterse 8a72f5c427
Added FromUnion to easily select from a UNION
This commit adds the module `FromUnion`, which provides the class method
`from_union`. This simplifies the process of selecting data from the
result of a UNION, and reduces the likelihood of making mistakes. As a
result, instead of this:

    union = Gitlab::SQL::Union.new([foo, bar])

    Foo.from("(#{union.to_sql}) #{Foo.table_name}")

We can now write this instead:

    Foo.from_union([foo, bar])

This commit also includes some changes to make this new setup work
properly. For example, a bug in Rails 4
(https://github.com/rails/rails/issues/24193) would break the use of
`from("sub-query-here").includes(:relation)` in certain cases. There was
also a CI query which appeared to repeat a lot of conditions from an
outer query on an inner query, which isn't necessary.

Finally, we include a RuboCop cop to ensure developers use this new
module, instead of using Gitlab::SQL::Union directly.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
2018-09-17 12:39:43 +02:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Shinya Maeda 8fa361b2d9 Squashed commit of the following:
commit 610c02c305d9fb3c7d271883450a5fee8b0cf16f
Merge: f2088edb260 84f24dcef0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 23:01:38 2018 +0900

    Merge branch 'master-ce' into improve-junit-support-be

commit f2088edb26008e5791b7be86fc02fc470c881143
Merge: c67e1d32cac 339f47abec1
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 21:52:10 2018 +0900

    Merge branch 'improve-junit-support-be' of gitlab.com:gitlab-org/gitlab-ce into improve-junit-support-be

commit c67e1d32cac731b895e2f49a24ce0e1726b8196c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 21:51:39 2018 +0900

    Remove debuggable fixtures

commit 339f47abec1d0ce815e6103a087902d71d8ff5be
Merge: 7a33a9be724 96b748fbcc0
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Aug 7 11:10:18 2018 +0100

    Merge branch 'improve-junit-support-be' of https://gitlab.com/gitlab-org/gitlab-ce into improve-junit-support-be

    * 'improve-junit-support-be' of https://gitlab.com/gitlab-org/gitlab-ce:
      Add spec for latest
      Add spec for merge request
      Add spec for cache invalidation
      Add spec for pipeline
      Add spec
      Fix specs
      Support corrupted fixtures
      Add  cache key to error message

commit 7a33a9be724dbde79a24cec77658952ff2d2fa6c
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Aug 7 11:09:56 2018 +0100

    Show resolved failures

commit 96b748fbcc00a98a13aeb78f5d97de9cf25035b6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 18:50:05 2018 +0900

    Add spec for latest

commit 0e8b024169b4b0ac272331117ac2fa821c4052f7
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 18:24:38 2018 +0900

    Add spec for merge request

commit 8690a699bc98394ad4deebdc91e6690758c5965e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 18:18:55 2018 +0900

    Add spec for cache invalidation

commit 97678e1612826af409ca8a04b6c0dc830f7b66c6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 18:01:03 2018 +0900

    Add spec for pipeline

commit 96c2a698af049e4026c68e74b1f41a265464b2b2
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 17:52:21 2018 +0900

    Add spec

commit 67bcbd25a3c13abb78ea43c0411f5aed417b87d0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 17:39:02 2018 +0900

    Fix specs

commit d7d49def2023f85c07d2718b83f35c8849f65f05
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 13:11:07 2018 +0900

    Support corrupted fixtures

commit d58dbbc17a7d954db22082615f5331c148c1061b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 13:10:47 2018 +0900

    Add  cache key to error message

commit f6f976216dc36333b5e05e3f0acdfca689350483
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 19:07:46 2018 +0900

    bring back debaggable fixtures

commit 48a7800e67a718145c0e88c324c0c1f9619e26a4
Merge: 2822b9e8a36 dd627072b3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Aug 7 09:22:22 2018 +0900

    Merge branch 'master-ce' into improve-junit-support-be

commit 2822b9e8a369162d098a72a58803c8494b2343cd
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 22:54:47 2018 +0900

    Move cache invalidation policy to outside of reactive cache

commit b35efb1764ae61bb31dacbf79dbc022dcee3a203
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 22:34:10 2018 +0900

    ADd reactive cache an ability to invalite cache

commit feafee6f8a50f4a32866d8ae768e99766b0b7c73
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 19:25:22 2018 +0900

    Pipeline has test reports if latest builds have any

commit f302dbb73abe03c6c431e7d52d526e28a1586fee
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 19:18:56 2018 +0900

    Invalidate test reports cache if it's outdated

commit 83adaca01a1ee1cd64cac86b6fa3d10e2e4e2b98
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 18:08:06 2018 +0900

    Revert cache invalidation in expire pipeline cache worker

commit ec3af5de4ca34e2e92ad6b97f29733d6c65062bc
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 15:13:47 2018 +0900

    Fix feature spec

commit 0db48805a1ba68763be0504eb57218bde2380e4b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 14:07:46 2018 +0900

    Change lifetime of test reports cache to 10 minutes

commit 17f7e78bfe2188c349cda1ff90a3ea94d337461e
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 14:07:19 2018 +0900

    Add changelog

commit 89c87585ab7f5333a8139c02b330dd2caf0be31a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 14:01:20 2018 +0900

    Add feature spec

commit 1120cfd7a9ab06105f2e763c375fab00922b7e0c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Aug 6 12:55:47 2018 +0900

    Invalidate cache when pipeline status transits. Correct test reports from the latest builds
2018-08-07 23:03:48 +09:00
Sean McGivern 6b2b89f3cd Merge branch 'osw-fix-n-plus-1-for-mrs-without-merge-info' into 'master'
Avoid N+1 on MRs page when metrics merging date cannot be found

Closes #47613

See merge request gitlab-org/gitlab-ce!21053
2018-08-07 10:38:46 +00:00
Oswaldo Ferreira 49dc8215b4 Avoid N+1 on MRs page when metrics merging date cannot be found 2018-08-06 18:13:36 -03:00
Sean McGivern b4415c0174 Merge branch 'issue_44821' into 'master'
Retrieve merge request closing issues from database cache

Closes #44821

See merge request gitlab-org/gitlab-ce!20911
2018-08-06 15:44:40 +00:00
Felipe Artur fdb5f285f9 Retrieve merge request closing issues from database cache 2018-08-06 11:58:22 -03:00
Shinya Maeda 85af3ea21a Added unique identifier to calculate_reactive_cache. Decoupled comparison logic to service. Fixed N+1 select queries. 2018-08-03 15:13:39 +09:00
Shinya Maeda 1f53cf7cf0 Merge branch 'master-ce' into artifact-format-v2-with-parser 2018-08-03 14:17:22 +09:00
Shinya Maeda d867081df1 Simplify the query to fetch base and head pipelines 2018-08-02 19:56:00 +09:00
Rémy Coutable f20a40f4a1 Merge branch 'frozen-string-enable-app-models' into 'master'
Enable frozen string in app/models/*.rb

See merge request gitlab-org/gitlab-ce!20851
2018-08-02 09:11:52 +00:00
Shinya Maeda b9a9e69d39 Squashed commit of the following:
commit 1095f6636db1c9bcd200c9c59e4b14ae70c0884b
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 14:25:45 2018 +0900

    Fix spec

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

    Fix static analysis

commit 32f46f402b53fc23770224f5c890bd4acfc39e60
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 7e12ef867b3e20bf1d35421a3b82350e9c673962
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Aug 2 10:22:45 2018 +0900

    Add spec for test reports comparer serializer

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

    Remove unnecessary comments

commit aca76ded6abf65d1f54008f9865ec7055f51300c
Merge: f6cf7c1c98b 9812e5dd7c
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 f6cf7c1c98b29c6a9a2e59d0a438bf77972e0aee
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 642a3d9215fc004ceaa431648a44d3a7671fb9e3
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 23:39:14 2018 +0900

    Mkae reactive cache key unique per pipeline ids

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

    Add spec for entity

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

    Add spec for merge request model

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

    Add spec for build and pipeline model

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

    Add specs for test reports comparer

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

    Add test_reports_spec

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

    Simpolify reactive cache usage. Improve code structure.

commit faaa41e5bcf4c6c76881957e96e4b3b278aee460
Merge: 9a6b3b7f0ab d799da4a18e
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 9a6b3b7f0ab32a70f63b1fe81d78616e6f88f4cc
Merge: 04cd0ed8812 b690c268c2
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 d799da4a18ec9f0d91dd48ac1c9abc3283235b99
Merge: dc874468571 04cd0ed8812
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 dc8744685713a8ab9d3eb7987c7fcf898e8dcd38
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Tue Jul 31 17:49:35 2018 +0100

    Removes frontend code

commit 04cd0ed8812f5fdd9cd00540155ec01edc0b42de
Merge: 8003540237e 0295e478b22
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 8003540237e9070a93ccd1b89a65b1f45ba8234d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Aug 1 00:13:39 2018 +0900

    Remove debuggable fixtures

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

    Fixes broken tests

commit 4fa50ca7fc1e3ab5d0995dc85245fc8ba013d2ce
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 2dc45f714f449bd71b03f34585724e46be9bee4f
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 18:20:22 2018 +0900

    Remove unnecessary parameters from build#each_test_report

commit 89d7398ae71bff15a397c2b10eb5134e2bc43a7b
Merge: 08d6ac5262c 02e35a0d26
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 08d6ac5262c14f1d67d74238927bcaf62d8efab5
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 31 17:57:02 2018 +0900

    Add spec for test case and test suite

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

    Add spec for gzip parser and adapter

commit 4c29079c4aeda0bde7c3ce6d9f1d5d5da9ffd657
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 3fa747db101f4d421e539b7c591a85db02011d2e
Merge: 4f7e9d54d52 69c87c3d1f0
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 4f7e9d54d5298bfb1566028f59009cc2b665ae3b
Merge: 18ed332734a 7758fdf1ad
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 69c87c3d1f0559ea21bb8b5f1005685db59aded5
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 18ed332734a2c95a9f93bc7d173c8b76d22867fe
Merge: 05944862e9c 2c15e359c38
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 05944862e9ce9983ed258b7795166faffb38522a
Merge: c1bef2ee559 3d2dad449d
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 2c15e359c38d208cab16852489d9317657bd805c
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Mon Jul 30 11:14:48 2018 +0100

     Patched a weird status issue

commit 5a76071b91aa40de9dc1b0e5537fa3f8f081fdcd
Merge: 6a2c69f8ab6 c1bef2ee559
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 c1bef2ee559c0f3c263daf2d3e92a4485cdd010e
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 b2ccce593b578c434febdd2f945a665a6652fd4e
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 29dfd45264427f6bd064aa62401c6be5ac4c4e14
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 30 10:35:34 2018 +0900

    Update old changes

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

    Fix static analysis

commit e9ad9df37d09330c1a6d23ac46d0923cb24fe636
Merge: fda5e9bd986 1f9992625e
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 6a2c69f8ab643960e434af867e8b61399b1dafc2
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Fri Jul 27 15:54:02 2018 +0100

    Auto fixes with eslint

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

    Updates the textGenerator for reports

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

    Remove unnecessary schema change

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

    Fix schema version

commit e63cc95742eac125691f8d3aac2820bbcc6113ec
Merge: 8a734c3d933 8b3c7f57b2
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 0d613f03203a84f91efaec9b6e0244cfc6603457
Author: Sam Beckham <sbeckham@gitlab.com>
Date:   Thu Jul 26 16:24:48 2018 +0000

    Full list of vulnerabilities

commit 8a734c3d9333415707fe73a233278d2dbafabc38
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 e16a2ddd47066521220c045daf3a55367d008edf
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 18:00:39 2018 +0100

    Adds the 'new' badge to the issues list

commit ac9bc3a293724c6729a2b58273344dc920fffa8b
Merge: f013f0219cf 44904f34593
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 f013f0219cf2ac52fc4a7c8937c1cadd750adeae
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:47:30 2018 +0100

    Fixes some missed conflicts

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

    Fixes a missed conflict

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

    Fixes some merge conflicts

commit ef5c9a5853b3cff1f5a952e5a87593c187834019
Merge: 181f98f695e 8f3b9c0d313
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 181f98f695eac05ffc6b5d57d665f4bd52d43f21
Author: samdbeckham <sbeckham@gitlab.com>
Date:   Wed Jul 25 15:27:48 2018 +0100

    Adds a proper check for loading errors

commit 24b108d4b15c87c1dd530ccd9bf7ed1b1a44faa3
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 5f4b682afae624feebeea101cae2517f673467f4
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 0252d861556cf66098e7e589f5889887b7b0309b
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 b8207fae37cd035010e66c158211913f41790bf8
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:24:05 2018 +0900

    Fix N+1 problem at collect_test_reports

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

    Implement reactive cache worker

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

    Refactoring test_results to test_reports

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

    Revert archive_metadata refactoring

commit c2387c534c11a29cc0db815cb3219dd80bb6ed03
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 761aec1dc095c30e1eee0bf2a3ea7eceb19a5e06
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:57:10 2018 +0100

    Removes mocked data

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

    Render grouped test report in MR widget

commit 8a8678f58e86f29a69d052978b3b76fcb9baeacc
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 d84e1b0be459b314f4fb706e381f1c36235135e8
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 09:37:45 2018 +0100

    Moves payload to the correct action

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

    Adds payload to the fetchReports success spec

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

    Updates documentation and test mock endpoint

commit c6a1a39efefb7b8e938ec679c57ca6810a8f8919
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 f0077c4708c246eedb6f9259c3b3b23c29755b26
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 12:44:16 2018 +0100

    Initial structure for reports app

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

    Check pipeline status at has_test_results?

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

    Specify DOWNTIME=false

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

    Wrap long lines

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

    Checking filr_format and file_type paring

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

    Fix build presenter spec

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

    Erase test reports at the proper timing

commit cb70174fe7624a3dc128ab085e6ae529563b7f49
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 dceb8b58a13396d9181be0e8be49a0b35509c039
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:42:16 2018 +0900

    Implement config artifact presenter

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

    Introduce ARCHIVE_LEGACY_TRACES_MIGRATION_VERSION check

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

    Revert unnecessary change

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

    Remove scattering around erase_test_reports!

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

    Rever archive_metadata refactoring  (For simplifying)

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

    Use array_of_strings_or_string in Command

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

    Fix spec

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

    Fix presenter spec

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

    Fix artifact migratable

commit d432f1665b8146527721b667d4b6abe61d8c57f6
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 7523168a1e9612e17c55d0b42d2d9c664d0d942d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 17:57:15 2018 +0900

    Impolement job_artifact.test_reports method

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

    Fix erase method

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

    Fix spec

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

    Add java ant Junit test report in fixtures

commit 292e10b98628abc554c53a8d7b0345edcb5dbd66
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 b59d68c9b9a39aeb4a25f19e27b2495c7e2b2f85
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Wed Jul 18 12:17:49 2018 +0200

    Add summary to test results json

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

    Fix fixtures for development

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

    Evaluate artifact_format

commit 618e023055f229d908c68213f456a7797156f7cf
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 0b5f9ff76f87b5d3b9c2eebd4ab8c69de5d4c201
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 17:18:19 2018 +0200

    Improve code of JUnit reports

commit 5fa026db0baa32cd063fbff3ec2532144f089236
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 b4dcab7b7f89ed0bf3103a5b0022343620a0dec4
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 19:52:01 2018 +0900

    Implement comprare failed tests

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

    Objectize each test suit and summary

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

    Pass build.group_name as testsuite name

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

    Remove unnecessary files

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

    Add parser and testresults

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

    Fix sending junit.xml

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

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

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

    Revert refactoring

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

    Revert refactoring

commit 3a50b86d147734ccf406991309d86ebb41a828c8
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 0dd37009c4e202422746577cb95651b32def8c46
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:20:28 2018 +0900

    Add file_format to factory

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

    Rename migration file properly

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

    Revert artifacts_archive_file refactoring

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

    Dry up the converion in Entry::Reports

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

    Set file_format at callers

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

    Use presenter for presenting artifacts hash to runner

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

    Support deleting junit artifact. Make wording explicit

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

    Add changelog

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

    Fix static analysis

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

    Fix Config::Entry::Artifacts

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

    Generalized by DEFAULT_FILE_FORMAT

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

    Cleanup API::Entities::JobRequest::Artifacts

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

    Simplified file_type relations

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

    Remove unnecessary change

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

    Add gzip XML parser

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

    Fix errors typo

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

    Use the correct type name

commit 66edd04c62a6b33dfa12962b8e7ccc7132c49fa1
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 d586f03067678457223c8ea4e6ed925e05a19c92
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:23:55 2018 +0900

    Add job_artifacts_junit relation

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

    Fix raw to raw?

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

    Temporaly use type Hash for reports

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

    Revert unnecessary change

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

    Use file_format raw for trace

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

    Check the presence of the file_format

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

    Add format_restriction validation

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

    Artifacts presenter (Halfway)

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

    Fix schema.rb

commit e64af496b4b147d221fd99ef6b2343c4fcbfef1d
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 20c333c9cb2cc66daaa000af5178c3d700a85e95
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:25:10 2018 +0900

    Change column name to artifact_format

commit 16b670f42daf3a3fc6ca1443b6a50e4473231c46
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 808355fae0c9869a26c95a90b0efe17a7b6e26d2
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 17:47:18 2018 +0900

    Validate compression. Clean up schema

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

    Make compression params at the first level

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

    Reorganize components

commit 8f3b9c0d313f9eeef1b6e6b5eccf622156e960bd
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 9cabd787fc392c7a442cd8b2de798da36c8b67bc
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 25 16:24:05 2018 +0900

    Fix N+1 problem at collect_test_reports

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

    Implement reactive cache worker

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

    Refactoring test_results to test_reports

commit 41a439c75983a8bd200e0728b231487ff6e1699c
Merge: bc959fffb1a 7105b37a558
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 bc959fffb1a1e8937078a1399dad2f698534ac84
Merge: 291a9236547 1ebaaaf2094
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 1ebaaaf2094c47c03e16745d2f8af736ec102b76
Merge: bfdf565800b dc7b4b7bb9
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 23 14:22:29 2018 +0900

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

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

    Revert archive_metadata refactoring

commit 7105b37a558acf22a23125cddfefc517c040a0fb
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 d82efd8fa8329758dd3a956d5d47956ccb3ce643
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 18:57:10 2018 +0100

    Removes mocked data

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

    Render grouped test report in MR widget

commit 8e74f14c26b9df6a4fdc4fb79322b13b06c3c509
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 570e7713c76b247c6da886dc60edce10657558b1
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 09:37:45 2018 +0100

    Moves payload to the correct action

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

    Adds payload to the fetchReports success spec

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

    Updates documentation and test mock endpoint

commit 920b74f519091000dc73a3be02c472ea226aa451
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 ebebf4042bbcdcc32d5aa65b0da470ddc52f0f8e
Author: Filipa Lacerda <filipa@gitlab.com>
Date:   Fri Jul 20 12:44:16 2018 +0100

    Initial structure for reports app

commit 746c260d5e4ae4604a3b072e9c58e6c2ee1e114e
Merge: 82a8d55742f bfdf565800b
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 bfdf565800b58e838a760aa01d2fadb64e2d768f
Merge: 681bd6a878a 44dbeccbe1
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:10:47 2018 +0900

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

commit 82a8d55742f73a43c5281af8245f5e5873985344
Merge: b2183151e6a 44dbeccbe1
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 b2183151e6a7344a327883a2658030920e256e47
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 19:06:46 2018 +0900

    Check pipeline status at has_test_results?

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

    Specify DOWNTIME=false

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

    Wrap long lines

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

    Checking filr_format and file_type paring

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

    Fix build presenter spec

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

    Erase test reports at the proper timing

commit 402ae97ecf7f9e3fe541f2d6abef6e47ab740452
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 75f75b3f5988398fff0660ca5f04aec756ab03bb
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 20 15:42:16 2018 +0900

    Implement config artifact presenter

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

    Introduce ARCHIVE_LEGACY_TRACES_MIGRATION_VERSION check

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

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

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

    Revert unnecessary change

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

    Remove scattering around erase_test_reports!

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

    Rever archive_metadata refactoring  (For simplifying)

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

    Use array_of_strings_or_string in Command

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

    Fix spec

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

    Fix presenter spec

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

    Fix artifact migratable

commit a3930853c93862007ba6814511bc32042c7f4986
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 e31121cb5e617b0f05e375c2150ece0e38e5e0d6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 17:57:15 2018 +0900

    Impolement job_artifact.test_reports method

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

    Fix erase method

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

    Fix spec

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

    Add java ant Junit test report in fixtures

commit d47efe84ff6dda79edd00c9b055d752872af1e11
Merge: e0dc7d97efd 7ade498101d
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 7ade498101d02573b20a2405ebe0bdb8efd8aa3b
Merge: e7be6b2b362 98eccfc44c
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 19 12:37:22 2018 +0900

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

commit e0dc7d97efdc0a3ddeb29f8b29f7d18e34607960
Merge: 26578902d09 1859a0f9e0c
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 26578902d097979ca32a6453a33d699209077aa5
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 1859a0f9e0c0f8f10ba640a8826b9ccade9fd15f
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Wed Jul 18 12:17:49 2018 +0200

    Add summary to test results json

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

    Fix fixtures for development

commit 8b761adfb85d0631d2a78169f8440aca3b40c86d
Merge: 84c64a792bf e7be6b2b362
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 e7be6b2b3624ba44d56143084731cb9a6168f974
Merge: 5a8d4930e01 9bdc9b1ae6
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 18 15:43:36 2018 +0900

    Merge branch 'master' into artifact-format-v2

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

    Evaluate artifact_format

commit 84c64a792bf5d3a42bd8000eaa9fc6f5aeacc604
Merge: e2670a3c642 9bdc9b1ae6
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 e2670a3c642ba33e79202fc9adb044a78260c515
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 5ea46ce5cd6d0f74802216d1c63d274a48d3cd08
Author: Kamil Trzciński <ayufan@ayufan.eu>
Date:   Tue Jul 17 17:18:19 2018 +0200

    Improve code of JUnit reports

commit 0553827fff5e1796bbfcdd7a5daf324a7dd16ea0
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 55edde40b15b3499cfc7ecbbe08f15cae9f6661a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Tue Jul 17 19:52:01 2018 +0900

    Implement comprare failed tests

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

    Objectize each test suit and summary

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

    Pass build.group_name as testsuite name

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

    Remove unnecessary files

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

    Add parser and testresults

commit c61465b962dd2774cf08ef7db81ab358a2c08ba5
Merge: da6e141e7b9 c3ce06aa9bc
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 c3ce06aa9bc6481b37a16d175adf0fd1c37a1bc0
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 22:27:46 2018 +0900

    Fix sending junit.xml

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

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

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

    Revert refactoring

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

    Revert refactoring

commit 14821f3babcc210bc52e4e825adc8333752fbc88
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 882faeab57ab39d18f72abd9b65d286db92e1011
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 17:20:28 2018 +0900

    Add file_format to factory

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

    Rename migration file properly

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

    Revert artifacts_archive_file refactoring

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

    Dry up the converion in Entry::Reports

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

    Set file_format at callers

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

    Use presenter for presenting artifacts hash to runner

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

    Support deleting junit artifact. Make wording explicit

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

    Add changelog

commit abde0f2ab5c5c1d99b2f94a049984877bb5a4d77
Merge: 4c87e5b388f fabf6a5634
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Mon Jul 16 13:22:22 2018 +0900

    Merge branch 'master' into artifact-format-v2

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

    Fix static analysis

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

    Fix Config::Entry::Artifacts

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

    Generalized by DEFAULT_FILE_FORMAT

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

    Cleanup API::Entities::JobRequest::Artifacts

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

    Simplified file_type relations

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

    Merge branch 'master' into artifact-format-v2

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

    Remove unnecessary change

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

    Add gzip XML parser

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

    Fix errors typo

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

    Use the correct type name

commit da4ca63f25a27a1268317952061c81a28516653f
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 4098a8f10f92a6efa48080f8925809e251066f9d
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Thu Jul 12 13:23:55 2018 +0900

    Add job_artifacts_junit relation

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

    Fix raw to raw?

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

    Merge branch 'master' into artifact-format-v2

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

    Temporaly use type Hash for reports

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

    Revert unnecessary change

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

    Use file_format raw for trace

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

    Check the presence of the file_format

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

    Add format_restriction validation

commit d64fbd388cb2294447df5185366d8b5016591949
Merge: 7ec81e7c7d1 c2a0a3ab1a
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Wed Jul 11 15:11:44 2018 +0900

    Merge branch 'master' into artifact-format-v2

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

    Artifacts presenter (Halfway)

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

    Fix schema.rb

commit b630c670c707548799c6852e4465ef94fb4a0572
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 e7e37612487b556320d27f4fe0de32cd4ec20720
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 19:25:10 2018 +0900

    Change column name to artifact_format

commit f3f25d56a7c627f4bb9d91d19de175273a7a6a81
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 d7e0709319ab8fe35a2598a3d484eb89b1885934
Author: Shinya Maeda <shinya@gitlab.com>
Date:   Fri Jul 6 17:47:18 2018 +0900

    Validate compression. Clean up schema

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

    Make compression params at the first level

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

    Reorganize components
2018-08-02 15:06:39 +09:00
Jan Provaznik 6b2b3d7f49 Resource event model 2018-08-01 08:58:49 +00:00
gfyoung 50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00
Mark Chao d907b894be Fix notify_conflict? raising exception when branches do not exist
repository.can_be_merged? can raise error if diff_head_sha or
target_branch are absent, therefore check those explicitly.
2018-07-02 19:42:23 +08:00
Mark Chao ea25fbb8f5 Notify conflict only for opened/locked merge requests 2018-06-25 15:20:29 +00:00
Oswaldo Ferreira f5ed18e1e3 Delete non-latest merge request diff files upon diffs reload 2018-06-24 18:01:37 -03:00
Felipe Artur 3e66795ef1 Changes tab VUE refactoring 2018-06-21 12:22:40 +00:00
Mark Chao 5b994b8199 Notify only when unmergeable due to conflict
There is still the edge case when 'no commits' changes to 'conflict'
would not trigger notification, which we ignore for now.

Calling can_be_merged? can cause exception (e.g. non-UTF8)
Ignore those by rescueing.

Remove unmergeable_reason as now only conflict is notified

Update spec
2018-06-20 23:27:17 +08:00
Mark Chao 68cb1c2651 Revert rename allow collaboration column 2018-06-08 13:12:51 +00:00
Robert Speicher 6ced2f1243 Merge branch '42751-rename-mr-maintainer-push' into 'master'
Rephrase Merge Request Maintainer Edit

See merge request gitlab-org/gitlab-ce!19061
2018-06-05 15:04:18 +00:00
Mark Chao 0d44f4d50e Rephrase "maintainer" to more precise "members who can merge to the target branch"
"Maintainer" will be freed to be used for #42751
2018-06-01 14:33:12 +09:00
Shinya Maeda 272b8dca80 Merge branch 'master' into per-project-pipeline-iid 2018-06-01 14:32:40 +09:00
Oswaldo Ferreira db92672966 Ensure metrics regardless of being imported on MRs 2018-05-30 12:14:56 -03:00
blackst0ne 4cff66a6c4 Add 'squash and rebase' feature to CE 2018-05-29 20:51:43 +11:00
Shinya Maeda 1d20679e9c Merge branch 'master' into per-project-pipeline-iid 2018-05-28 20:01:56 +09:00
Mark Chao b1ab1609b6 Avoid race condition of re-triggering mark_as_unchecked 2018-05-18 17:02:35 +08:00
lulalala 953bb41f25 Create TODO when MR became unmergeable
Old behavior of creating TODO when
“Merge When Pipeline Succeeds” service fails, is generalized to:

Create a TODO whenever MR became unmergeable
(and similar to notification, MR author and merge_user are both applicable)
2018-05-17 08:54:57 +08:00
lulalala dc174e9655 Notify with email when merge request became unmergeable
Display MR unmergeable reasons
2018-05-17 08:54:51 +08:00
lulalala 179a1ee7c6 Add MergeRequest#merge_participants
For notifying via todo or email.
2018-05-17 08:54:47 +08:00
lulalala 7517105303 Add cannot_be_merged_recheck merge_status
First, transitions between can_be_merged & cannot_be_merged are removed,
as they are currently blocked in `check_if_can_be_merged`.
`can_be_merge` always returns to `unchecked` first,
before it can transition to `cannot_be_merged` (and vice versa).

We want to avoid repeated notification triggered by repeated transition
between `cannot_be_merged` & `unchecked`.

So we added `cannot_be_merged_recheck` state, similar to `unchecked`,
but as a mean to remember it’s from cannot_be_merged.

See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18042/#note_65945407

Since `unchecked` and `cannot_be_merged_recheck` both mean
“we are in the middle of checking if it is mergeable”,
quite often we need to see if merge_status is in either one of them,
so `check_state?` is added to achieve this.
2018-05-17 08:54:47 +08:00
Shinya Maeda a74184eb5e Fix static analysys 2018-05-11 16:52:48 +09:00
Shinya Maeda 0af2ab18fa Decouple to_params from AtomicInternalId concern 2018-05-08 14:57:41 +09:00
Oswaldo Ferreira 3063225ca2 Display merge commit SHA in merge widget after merge 2018-05-07 14:09:47 -03:00
blackst0ne 5a7fbb8d89 [Rails5] Fix params passed to MergeWorker 2018-05-03 08:52:51 +00:00
Andreas Brandl 9ea2fc85a3 Atomic internal ids for all models 2018-04-20 14:00:15 +00:00
Sean McGivern 39c9928cfb Fix N+1 in `MergeRequest#merge_request_diff_for`
Previously, this would issue a query for each unique `diff_refs_or_sha`
passed. This was because we didn't want to load other MR diffs into memory, as
they had some very large columns.

Now they are actually very small, and it's more efficient to just load them all
at once and do the finding in Ruby.
2018-03-21 17:24:46 +00:00
Andreas Brandl a0abb90478 Deprecate InternalId concern and rename. 2018-03-16 13:35:25 +01:00
Sean McGivern 6cd7f679d0 Only cache highlight results for latest MR diffs
Previously, we kept them all in the cache. We don't need the highlight results
for older diffs - if someone does view that (which is rare), we can do the
highlighting on the fly.
2018-03-15 11:49:53 +00:00
Bob Van Landuyt cfa9d1ed6b Only allow users that can merge to push to source
We only allow users that can merge the merge request to push to the
fork.
2018-03-07 17:00:50 +01:00
Bob Van Landuyt 792ab0631c Allow a user to select `allow maintainer to push`
When a project is not private, and the source branch not protected the
user can now select the option to allow maintainers to push to this
branch
2018-03-07 15:12:31 +01:00
Alejandro Rodríguez bc365bd15a Use persisted/memoized value for MRs shas instead of doing git lookups 2018-03-06 16:05:34 -03:00
Stan Hu 9a323c7e1f Memoize MergeRequest#rebase_in_progress? to prevent N+1 queries in Gitaly
MergeRequest#rebase_in_progress? and MergeRequest#rebase_path were called
twice each time per request. This memoization helps reduce the overall number
of queries.

See https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/51616319 as a failing
job.

Closes gitlab-org/gitlab-ee#4857
2018-02-08 10:28:50 +00:00
Oswaldo Ferreira dbfedb5adb Check MR state before submitting queries for discussion state 2018-01-29 23:53:47 -02:00
Sean McGivern f0df45fb8a Fix MR revert check when no merged_at is present 2018-01-29 10:49:14 +00:00
Nick Thomas b02f9b6141
Look at notes created just before merge when deciding if an MR can be reverted
On MySQL, at least, `Note#created_at` doesn't seem to store fractional seconds,
while `MergeRequest::Metrics#merged_at` does. This breaks the optimization
assumption that we only need to search for notes created *after* the MR has
been merged.

Unsynchronized system clocks also make this a dangerous assumption to make.

Adding a minute of leeway still optimizes away most notes, but allows both
cases to be handled more gracefully. If the system clocks are more than a
minute out, we'll still be broken, of course.
2018-01-25 11:39:46 +00:00
Hiroyuki Sato a7d26f00c3 Display related merge requests in commit detail page 2018-01-12 20:38:36 +00:00
Rémy Coutable 6438a1afa7 Merge branch '41807-15665-consistently-502s-because-it-fetches-every-commit' into 'master'
Resolve "!15665 consistently 502s because it fetches every commit"

Closes #41807

See merge request gitlab-org/gitlab-ce!16320
2018-01-12 15:47:50 +00:00
Sean McGivern f3cf8cc8d1 Only search for MR revert commits on notes after MR was merged
If we search for notes before the MR was merged, we have to load every commit
that was ever part of the MR, or mentioned in a push. In extreme cases, this can
be tens of thousands of commits to load, but we know they can't revert the merge
commit, because they are from before the MR was merged.

In the (rare) case that we don't have a `merged_at` value for the MR, we can
still search all notes.
2018-01-12 13:19:05 +00:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Yorick Peterse d0b8f536a1
Remove soft removals related code
This removes all usage of soft removals except for the "pending delete"
system implemented for projects. This in turn simplifies all the query
plans of the models that used soft removals. Since we don't really use
soft removals for anything useful there's no point in keeping it around.

This _does_ mean that hard removals of issues (which only admins can do
if I'm not mistaken) can influence the "iid" values, but that code is
broken to begin with. More on this (and how to fix it) can be found in
https://gitlab.com/gitlab-org/gitlab-ce/issues/31114.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37447
2018-01-08 17:04:45 +01:00
Jan Provaznik 27a75ea175 Backport 'Rebase' feature from EE to CE
When a project uses fast-forward merging strategy user has
to rebase MRs to target branch before it can be merged.
Now user can do rebase in UI by clicking 'Rebase' button
instead of doing rebase locally.

This feature was already present in EE, this is only backport
of the feature to CE. Couple of changes:
* removed rebase license check
* renamed migration (changed timestamp)

Closes #40301
2018-01-05 09:34:59 +01:00
Sean McGivern b0bc676f20 Merge branch 'zj-mr-diff-memoization-bug' into 'master'
Clear caches before updating MR diffs

See merge request gitlab-org/gitlab-ce!15916
2017-12-14 13:27:00 +00:00
Zeger-Jan van de Weg 8ad412559d
Clear caches before updating MR diffs
The hook ordering influenced the diffs being generated as these used
values from before the update due to the memoization still being in
place. This commit reorders them and tests against this behaviour.
2017-12-14 11:22:34 +01:00
Annabel Dunstone Gray 9d0fc98c7d Merge branch '33926-update-issuable-icons' into 'master'
Update issuable status icons

Closes #33926

See merge request gitlab-org/gitlab-ce!15898
2017-12-13 19:14:38 +00:00
Sean McGivern 013e681625 Merge branch 'issue_41021' into 'master'
Prevent worker that updates merge requests head pipeline from failing jobs

Closes #41021

See merge request gitlab-org/gitlab-ce!15870
2017-12-13 16:45:48 +00:00
Felipe Artur 504f77b43a Prevent worker that updates merge requests head pipeline from failing jobs 2017-12-13 13:36:52 -02:00
Eric Eastwood a5439897d2 Update issuable status icons
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/33926

Changed file icons already addressed in
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/15367
2017-12-13 00:11:57 -06:00
Zeger-Jan van de Weg 3ab026b7d6
Use memoization for commits on diffs
The Gitaly CommitService is being hammered by n + 1 calls, mostly when
finding commits. This leads to this gRPC being turned of on production:
https://gitlab.com/gitlab-org/gitaly/issues/514#note_48991378

Hunting down where it came from, most of them were due to
MergeRequest#show. To prove this, I set a script to request the
MergeRequest#show page 50 times. The GDK was being scraped by
Prometheus, where we have metrics on controller#action and their Gitaly
calls performed. On both occations I've restarted the full GDK so all
caches had to be rebuild.

Current master, 806a68a81f, needed 435 requests
After this commit, 154 requests
2017-12-12 16:28:26 +01:00
micael.bergeron 360b94ceba adding view and feature specs 2017-12-07 09:06:59 -05:00
micael.bergeron 16c8b91092 revert the `#all_pipelines` method to use the pluck
the `ci_pipelines.sha` column is not the same type than the
`merge_request_diff_commits.sha` column (varchar, bytea)
2017-12-07 09:02:42 -05:00
micael.bergeron cb6f51ec9b add support for the commit reference filter 2017-12-07 09:01:37 -05:00
micael.bergeron 716f9cbb41 tidying up the changes 2017-12-07 09:01:37 -05:00
micael.bergeron 3d8fbd12b8 add support for commit (in mr) to reference filter 2017-12-07 09:01:27 -05:00
Yorick Peterse 856447ccd3
Throttle the number of UPDATEs triggered by touch
This throttles the number of UPDATE queries that can be triggered by
calling "touch" on a Note, Issue, or MergeRequest. For Note objects we
also take care of updating the associated "noteable" relation in a
smarter way than Rails does by default.
2017-12-06 15:59:37 +01:00
Felipe Artur 5cf3ff27c8 Use actual head pipeline on merge request serializer 2017-12-05 12:54:10 -02:00
Felipe Artur f586dc0735 Check if head_pipeline is correct before merging 2017-12-05 12:54:10 -02:00
Felipe Artur 8f78ba554d Improve MergeRequest#head_pipeline 2017-12-05 12:54:10 -02:00
Jarka Kadlecova fe673b4927 Ensure pippeline corresponds with the sha of an MR 2017-12-05 12:54:10 -02:00
Lin Jen-Shin 4925ec5087 We could simply count the commits 2017-11-30 16:03:28 +08:00
Yorick Peterse 124fa93a8a Merge branch 'remove-mr-diff-serialised-columns' into 'master'
Remove serialised diff and commit columns

Closes #39533

See merge request gitlab-org/gitlab-ce!15582
2017-11-29 13:33:06 +00:00
Rémy Coutable becf29e3ab Merge branch '40530-merge-request-generates-wrong-diff-when-branch-and-tag-have-the-same-name' into 'master'
Resolve "Merge request generates wrong diff when branch and tag have the same name"

Closes #40530

See merge request gitlab-org/gitlab-ce!15591
2017-11-28 18:01:09 +00:00
Sean McGivern 3c6a4d6363 Ensure MRs always use branch refs for comparison
If a merge request was created with a branch name that also matched a tag name,
we'd generate a comparison to or from the tag respectively, rather than the
branch. Merging would still use the branch, of course.

To avoid this, ensure that when we get the branch heads, we prepend the
reference prefix for branches, which will ensure that we generate the correct
comparison.
2017-11-28 17:01:38 +00:00
Sean McGivern 4ebbfe5d3e Remove serialised diff and commit columns
The st_commits and st_diffs columns on merge_request_diffs historically held the
YAML-serialised data for a merge request diff, in a variety of formats.

Since 9.5, these have been migrated in the background to two new tables:
merge_request_diff_commits and merge_request_diff_files. That has the advantage
that we can actually query the data (for instance, to find out how many commits
we've stored), and that it can't be in a variety of formats, but must match the
new schema.

This is the final step of that journey, where we drop those columns and remove
all references to them. This is a breaking change to the importer, because we
can no longer import diffs created in the old format, and we cannot guarantee
the export will be in the new format unless it was generated after this commit.
2017-11-28 16:13:40 +00:00
George Andrinopoulos 7fb1bb01bd Create issue and merge request destroy services 2017-11-25 22:09:18 +02:00
Sean McGivern c4d844f08b Merge branch 'issue_40374' into 'master'
Fix WIP system note not being created

Closes #40374

See merge request gitlab-org/gitlab-ce!15528
2017-11-24 09:38:45 +00:00
Felipe Artur 5c2c471a83 Fix WIP system note not being created 2017-11-23 17:25:14 -02:00
Sean McGivern 991bf24ec8 Use latest_merge_request_diff association
Compared to the merge_request_diff association:

1. It's simpler to query. The query uses a foreign key to the
   merge_request_diffs table, so no ordering is necessary.
2. It's faster for preloading. The merge_request_diff association has to load
   every diff for the MRs in the set, then discard all but the most recent for
   each. This association means that Rails can just query for N diffs from N
   MRs.
3. It's more complicated to update. This is a bidirectional foreign key, so we
   need to update two tables when adding a diff record. This also means we need
   to handle this as a special case when importing a GitLab project.

There is some juggling with this association in the merge request model:

* `MergeRequest#latest_merge_request_diff` is _always_ the latest diff.
* `MergeRequest#merge_request_diff` reuses
  `MergeRequest#latest_merge_request_diff` unless:
    * Arguments are passed. These are typically to force-reload the association.
    * It doesn't exist. That means we might be trying to implicitly create a
      diff. This only seems to happen in specs.
    * The association is already loaded. This is important for the reasons
      explained in the comment, which I'll reiterate here: if we a) load a
      non-latest diff, then b) get its `merge_request`, then c) get that MR's
      `merge_request_diff`, we should get the diff we loaded in c), even though
      that's not the latest diff.

Basically, `MergeRequest#merge_request_diff` is the latest diff in most cases,
but not quite all.
2017-11-23 12:14:56 +00:00
George Andrinopoulos 3963f91ee3 Move update_project_counter_caches? out of issue and merge request 2017-11-11 21:06:28 +02:00
Sean McGivern ec73ecb0a8 Fix another timeout when searching for pipelines
When we consider 'all' pipelines for MRs, we now mean:

1. The last 10,000 commits (unordered).
2. From the last 100 MR versions (newest first).

This seems to fix the MRs that time out on GitLab.com.
2017-11-10 14:27:26 +00:00
Rémy Coutable bf13746fd8 Merge branch 'dm-notes-for-commit-id' into 'master'
Use Commit#notes and Note.for_commit_id when possible to make sure we use all indexes available to us

Closes #34509

See merge request gitlab-org/gitlab-ce!15253
2017-11-08 16:04:15 +00:00
Douwe Maan fec48c6e17 Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us 2017-11-08 12:22:11 +01:00
Jarka Kadlecova ad6e650262 Refactor issuables index actions 2017-11-07 14:34:12 +01:00
micael.bergeron bb0543ef47 ignore the column before the migration
reword the changelog
remove dead code in the specs
2017-11-06 09:03:11 -05:00
micael.bergeron cd88fa8f80 removed the #ensure_ref_fetched from all controllers
also, I refactored the MergeRequest#fetch_ref method to express
the side-effect that this method has.

  MergeRequest#fetch_ref -> MergeRequest#fetch_ref!
  Repository#fetch_source_branch -> Repository#fetch_source_branch!
2017-11-03 08:13:11 -04:00
Jarka Kadlecova 064c8949bd CE port of code changed for epics 2017-11-02 07:14:35 +01:00
Yorick Peterse c14697a50b Merge branch '39054-activerecord-statementinvalid-pg-querycanceled-error-canceling-statement-due-to-statement-timeout' into 'master'
Resolve "ActiveRecord::StatementInvalid: PG::QueryCanceled: ERROR:  canceling statement due to statement timeout"

Closes #39054

See merge request gitlab-org/gitlab-ce!15063
2017-10-30 11:57:09 +00:00
Oswaldo Ferreira c4124fce48 Move locked check to a guard-clause 2017-10-30 11:21:23 +01:00
Oswaldo Ferreira a6c52c4e59 Make merge_jid handling less stateful in MergeService 2017-10-27 22:33:48 +02:00
Sean McGivern ba9b4c4de8 Avoid hitting statement timeout finding MR pipelines
For MRs with many thousands of commits, `SELECT DISTINCT(sha)` will be very
slow.

What we can't do to fix this:

1. Add an index. Postgres won't use it for DISTINCT without a lot of ceremony.
2. Do the `uniq` in Ruby. That can still be very slow with hundreds of
   thousands of commits.
3. Use a subquery. We haven't removed the `st_commits` column yet, but we will
   soon.

Until 3 is available to us, we can just do 2, but also add a limit clause. There
is no ordering, so this may return different results, but our goal with these
MRs is just to get them to load, so it's not a huge deal.
2017-10-27 14:20:55 +01:00
Oswaldo Ferreira b78954c13d Simplify check for running job on Redis 2017-10-13 10:17:41 +02:00
Oswaldo Ferreira 9ab0254085 Make "merge ongoing" check more consistent 2017-10-11 18:48:39 +02:00
Andrew Newdigate 47d19c2de1 Stop using `branch_names.include?` and use `branch_exists?` 2017-10-10 14:56:04 +00:00
Rémy Coutable f070265a6d
Introduce new hook data builders for Issue and MergeRequest
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-09 16:44:47 +02:00
Rémy Coutable 075d651604 Start adding Gitlab::HookData::IssuableBuilder
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-09 15:07:10 +02:00
Rémy Coutable 67d5ca9f92 Include the changes in issuable webhook payloads
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-09 15:07:10 +02:00
Douwe Maan 546b18b903 Merge branch 'tc-geo-read-only-idea' into 'master'
Create idea of read-only database

Closes #37534

See merge request gitlab-org/gitlab-ce!14688
2017-10-07 11:01:21 +00:00
Bob Van Landuyt 70716a1292 Allow creating merge requests across forks of a project 2017-10-07 11:46:23 +02:00
Toon Claes d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
Rémy Coutable 67de21c15b Move `fetch_ref` from MergeRequestDiff#ensure_commit_shas to MergeRequest
MergeRequest#create_merge_request_diff and MergeRequest#reload_diff are
the only places where we generate a new MR diff so that's where we
should fetch the ref.

This also ensures that the ref is not fetched when we call
merge_request.merge_request_diffs.create in
Github::Import#fetch_pull_requests.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-10-05 10:48:25 +02:00
Sean McGivern b1050bfe39 Merge branch 'merge-request-notes-performance' into 'master'
Use a UNION ALL for getting merge request notes

Closes #38508

See merge request gitlab-org/gitlab-ce!14620
2017-10-04 12:03:32 +00:00
Douwe Maan 2ee93c486c Merge branch '36876-mr-show-json-controller-perf-improvements' into 'master'
Reduce method calls while evaluating Projects::MergeRequestsController#show.json

See merge request gitlab-org/gitlab-ce!14285
2017-10-04 07:33:05 +00:00
Oswaldo Ferreira 1f54c9216f Reduce method calls while evaluating Projects::MergeRequestsController#show.json 2017-10-04 00:09:48 -03:00
Yorick Peterse c16b99a49c
Use a UNION ALL for getting merge request notes
In this particular case the use of UNION ALL leads to a better query
plan compared to using 1 big query that uses an OR statement to combine
different data sources.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/38508 for more
information.
2017-10-02 15:31:59 +02:00
Eric Eastwood 439e3f0735 Port semi-linear merge strategy to CE (mostly FE) 2017-09-29 14:13:35 -05:00
Yorick Peterse 57b96eb6db
Fix refreshing of issues/MR count caches
This ensures the open issues/MR count caches are refreshed properly when
creating new issues or MRs. This MR also includes a change to the cache
keys to ensure all caches are rebuilt on the fly.

This particular problem was not caught in the test suite due to a null
cache being used, resulting in all calls that would use a cache using
the underlying data directly. In production the code would fail because
a newly saved record returns an empty hash in #changes meaning checks
such as `state_changed? || confidential_changed?` would return false for
new rows, thus never updating the counters.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/38061
2017-09-19 17:16:45 +02:00
Andrew Newdigate 64d7ec0a9e Detect n+1 issues involving Gitaly 2017-09-19 10:55:37 +00:00
micael.bergeron 65bcd141c8 add controller spec
also fix some code styling issues
2017-09-06 09:00:57 -04:00
micael.bergeron b44a1bcd0b rework the contributor badge
- only show in merge-requests
 - show as a little glyph
2017-09-06 09:00:57 -04:00
Sean McGivern e8f29569bc Resolve outdated diff discussions on push 2017-09-06 10:08:03 +01:00
Sean McGivern dabce2c571 Merge branch 'git-operation-service-to-git' into 'master'
Prepare GitOperationService for moving to Gitlab::Git

See merge request !13773
2017-09-04 10:56:26 +00:00
Sean McGivern 2fc500819f Merge branch 'issue_36820' into 'master'
Remove closing external issues by reference error

Closes #36820

See merge request !13910
2017-09-01 09:15:40 +00:00
Felipe Artur 3e4013f217 Remove closing external issues by reference error 2017-08-31 17:15:30 -03:00
Sean McGivern dd406182cb Merge branch 'sidebar-cache-updates' into 'master'
Only update the sidebar count caches when needed

See merge request !13878
2017-08-31 14:30:03 +00:00
Jacob Vosmaer 8ad690b0d4 Prepare GitOperationService for move to Gitlab::Git 2017-08-31 15:35:59 +02:00
Yorick Peterse c158a22fd3
Only update the sidebar count caches when needed
This ensures the issues/MR cache of the sidebar is only updated when the
state or confidential flags changes, instead of changing this for every
update.
2017-08-30 15:49:40 +02:00
Lin Jen-Shin 86149a8216 Merge remote-tracking branch 'upstream/master' into 36807-gc-unwanted-refs-after-import
* upstream/master: (225 commits)
  Add changelog entry
  Backports EE 2756 logic to CE.
  Make rubocop happy
  Make profile settings dropdown consistent
  Add filter by my reaction
  Update spec initialization with it being a shared component
  Update identicon path and selector
  Renamed to `identicon` and make shared component
  Merge branch 'master-i18n' into 'master'
  Fix broken Frontend JS guide
  Replace 'project/star.feature' spinach test with an rspec analog
  Adds position fixed to right sidebar
  Fixes the margin of the top buttons of the pipeline page
  Remove commented out code
  Better align fallback image emojis
  Decrease Metrics/CyclomaticComplexity threshold to 15
  Add changelog
  Respect the default visibility level when creating a group
  Further break with_repo_branch_commit into parts
  Make sure inspect doesn't generate crazy string
  ...
2017-08-30 21:13:19 +08:00
Oswaldo Ferreira ffc576d7df Rename MergeRequest#async_merge to merge_async 2017-08-28 15:55:25 -03:00
Oswaldo Ferreira 9068083f86 Add changelog 2017-08-28 15:48:09 -03:00
Oswaldo Ferreira 4f17c6b763 Track enqueued and ongoing MRs 2017-08-28 15:48:09 -03:00
Oswaldo Ferreira d7f61bae8b Remove locked? check when unlocking a merge request
Our state machine shall have enough knowledge to not allow states other
than locked from transitioning to opened (e.g. MergeRequest#unlock_mr).
2017-08-28 15:48:09 -03:00
Lin Jen-Shin 081e2fce82 Try to make reserved ref names more obvious
So that whenever we want to reserve more, we're aware,
and don't mess it up.
2017-08-25 23:00:06 +08:00
Sean McGivern 7ab4efa8f8 Merge branch '36262_merge_request_reference_in_merge_commit_global' into 'master'
fix Merge request reference in merge commit is not global

Closes #36262

See merge request !13518
2017-08-24 09:09:45 +00:00
haseeb f5046e5258 [ci skip] changelog entry added for full merge request ref changes 2017-08-23 21:43:23 +05:30
Douwe Maan 75d1283e59 Merge branch 'cache-issue-and-mr-counts' into 'master'
Cache the number of open issues and merge requests

Closes #36622

See merge request !13639
2017-08-23 14:21:41 +00:00
Yorick Peterse 6ec53f5d48
Cache the number of open issues and merge requests
Every project page displays a navigation menu that in turn displays the
number of open issues and merge requests. This means that for every
project page we run two COUNT(*) queries, each taking up roughly 30
milliseconds on GitLab.com. By caching these numbers and refreshing them
whenever necessary we can reduce loading times of all these pages by up
to roughly 60 milliseconds.

The number of open issues does not include confidential issues. This is
a trade-off to keep the code simple and to ensure refreshing the data
only needs 2 COUNT(*) queries instead of 3. A downside is that if a
project only has 5 confidential issues the counter will be set to 0.

Because we now have 3 similar counting service classes the code
previously used in Projects::ForksCountService has mostly been moved to
Projects::CountService, which in turn is reused by the various service
classes.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36622
2017-08-23 13:42:29 +02:00
Felipe Artur 998833dfdc Remove ignore columns 2017-08-18 13:03:58 -03:00
Lin Jen-Shin d7e95d77d8 Use with_repo_branch_commit instead of fetch_ref directly
So that we could limit the access to Repository#fetch_ref
See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13416#note_37487433
2017-08-14 22:55:34 +08:00
haseeb df948f8ac2 fix Merge request reference in merge commit is not global 2017-08-13 12:58:19 +05:30
Lin Jen-Shin 41a5adca75 Don't try to create diffs if one of the branch is missing
Also fix a few tests
2017-08-10 23:53:55 +08:00
Lin Jen-Shin c772464b68 Introduce MergeRequest#write_ref and Repository#write_ref
so that we don't have to fetch it for non-forks
2017-08-10 22:20:53 +08:00
Brian Neel 9770c57fab Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
Oswaldo Ferreira 16cffa97f6 Move locked_at removal to post-deployment migration 2017-08-07 16:46:30 -03:00
Oswaldo Ferreira 0640b3d1d8 Store MergeWorker JID on merge request, and clean up stuck merges 2017-08-07 15:23:37 -03:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Yorick Peterse 6ef87a2083
Merge issuable "reopened" state into "opened"
Having two states that essentially mean the same thing is very much like
having a boolean "true" and boolean "mostly-true": it's rather silly.
This commit merges the "reopened" state into the "opened" state while
taking care of system notes still showing messages along the lines of
"Alice reopened this issue".

A big benefit from having only two states (opened and closed) is that
indexing and querying becomes simpler and more performant. For example,
to get all the opened queries we no longer have to query both states:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state IN ('opened', 'reopened');

Instead we can query a single state directly, which can be much faster:

    SELECT *
    FROM issues
    WHERE project_id = 2
    AND state = 'opened';

Further, only having two states makes indexing easier as we will only
ever filter (and thus scan an index) using a single value. Partial
indexes could help but aren't supported on MySQL, complicating the
development process and not being helpful for MySQL.
2017-07-28 13:31:51 +02:00
Jarka Kadlecova 7bee7b848a Support both internal and external issue trackers 2017-07-24 08:13:43 +02:00
Douwe Maan 87cb74a7bc Make sure MergeRequest commit methods work when either compare_commits or merge_request_diff is set 2017-07-13 18:53:11 -07:00
Stan Hu 43b9141c36 Merge branch 'sh-optimize-mr-api' into 'master'
Remove many N+1 queries with merge requests API

See merge request !12726
2017-07-08 06:22:09 +00:00
Stan Hu b963d45ca4 Remove many N+1 queries with merge requests API
Identified via `ENABLE_BULLET=1 bundle exec rspec spec/requests/api/merge_requests_spec.rb:34`

Improves speed of #34159
2017-07-07 16:31:21 -07:00
Douwe Maan 94e2a28684 Merge branch 'feature/user-datetime-search-api-mysql' into 'master'
Add creation time filters to user search API for admins

Closes #29507

See merge request !12682
2017-07-07 20:52:17 +00:00
James Lopez 6d28ad844d fix spec 2017-07-07 20:48:16 +02:00
Sean McGivern 4c0864fd9e Speed up `all_commit_shas` for new merge requests
For merge requests created after 9.4, we have a `merge_request_diff_commits`
table we can get all the SHAs from very quickly. We just need to exclude these
when we load from the legacy format, by ignoring diffs with no serialised
commits.

Once these have been migrated in the background, every MR will see this
improvement.
2017-07-07 13:59:23 +01:00
Sean McGivern aff5c9f3e5 Add table for merge request commits
This is an ID-less table with just three columns: an association to the merge
request diff the commit belongs to, the relative order of the commit within the
merge request diff, and the commit SHA itself.

Previously we stored much more information about the commits, so that we could
display them even when they were deleted from the repo. Since 8.0, we ensure
that those commits are kept around for as long as the target repo itself is, so
we don't need to duplicate that data in the database.
2017-07-06 17:36:10 +01:00
Yorick Peterse e1a3bf30b6
Rename ActiverecordSerialize cop
This cop has been renamed to ActiveRecordSerialize to match the way
"ActiveRecord" is usually written.
2017-07-06 12:01:36 +02:00
Yorick Peterse 8fbbf41e29
Added Cop to blacklist the use of `dependent:`
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
2017-07-06 12:01:36 +02:00
Yorick Peterse c63e322158
Add many foreign keys to the projects table
This removes the need for relying on Rails' "dependent" option for data
removal, which is _incredibly_ slow (even when using :delete_all) when
deleting large amounts of data. This also ensures data consistency is
enforced on DB level and not on application level (something Rails is
really bad at).

This commit also includes various migrations to add foreign keys to
tables that eventually point to "projects" to ensure no rows get
orphaned upon removing a project.
2017-07-06 12:01:36 +02:00
Douwe Maan 6ee0436c89 Merge branch 'tc-namespace-license-checks--multiple-assignees' into 'master'
CE counterpart of: Namespace license checks for multiple assignees

See merge request !11825
2017-07-04 14:49:08 +00:00
Adam Niedzielski 0eb3d18c56 Store merge request ref_fetched status in the database
Closes #34052
2017-06-26 17:36:09 +02:00
Grzegorz Bizon 0430b76441 Enable Style/DotPosition Rubocop 👮 2017-06-21 13:48:12 +00:00
Toon Claes 451e25532f Make MergeRequest respond to assignee_ids & assignee_ids=
To make it simpler to assign users to an Issuable, make MergeRequest
support the attribute `assignee_ids`.
2017-06-20 21:32:49 +02:00
Sean McGivern 352a9ed562 Merge branch '27070-rename-slash-commands-to-quick-actions' into 'master'
Rename "Slash commands" to "Quick actions"

Closes #27070

See merge request !11811
2017-06-16 16:32:53 +00:00
Felipe Artur 85cdde8d33 Migration - Remove position field from issues and merge requests 2017-06-16 12:03:15 -03:00
Eric Eastwood ea090291bb Rename "Slash commands" to "Quick actions"
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/27070

Deprecate "chat commands" in favor of "slash commands"

We looked for things like:

 - `slash commmand`
 - `slash_command`
 - `slash-command`
 - `SlashCommand`
2017-06-15 09:01:56 -05:00
Grzegorz Bizon 0218a0bd23 Merge branch 'dm-update-discussion-diff-position' into 'master'
Update diff discussion position per discussion instead of per note

Closes #33157

See merge request !11833
2017-06-01 14:00:00 +00:00
Douwe Maan 483d88a9cd Merge branch 'document-not-using-serialize' into 'master'
Document not using ActiveRecord's serialize method

See merge request !11821
2017-06-01 13:06:30 +00:00
Douwe Maan 09838ac626 Update diff discussion position per discussion instead of per note 2017-05-31 14:34:56 -05:00
Yorick Peterse cd74c1434e
Added Cop to blacklist the use of serialize
This Cop blacklists the use of ActiveRecord's "serialize" method, except
for cases where we already use this.
2017-05-31 14:03:37 +02:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Robert Speicher 8e2fefc6c4 Merge branch 'dm-diff-cleanup' into 'master'
Clean up diff rendering

See merge request !11390
2017-05-25 22:15:57 +00:00
Douwe Maan ab91f76e8b Add system note with link to diff comparison when MR discussion becomes outdated 2017-05-23 16:27:30 -05:00
Douwe Maan 7c479d88a9 Pass fallback_diff_refs to Diff::File instead of using view helpers 2017-05-23 15:37:05 -05:00
Douwe Maan 7a7e9288d4 Stop MR conflict code from blowing up when branches are missing 2017-05-18 15:48:42 -05:00
Douwe Maan e4261fe3ce Merge branch 'fix-conflict-resolution-with-corrupt-repos' into 'master'
Fix conflict resolution from corrupted upstream

Closes gitlab-ee#2128

See merge request !11298
2017-05-12 20:37:30 +00:00
Sean McGivern ad2bfeb857 Fix conflict resolution from corrupted upstream
I don't know why this happens exactly, but given an upstream and fork repository
from a customer, both of which required GC, resolving conflicts would corrupt
the fork so badly that it couldn't be cloned.

This isn't a perfect fix for that case, because the MR may still need to be
merged manually, but it does ensure that the repository is at least usable.

My best guess is that when we generate the index for the conflict
resolution (which we previously did in the target project), we obtain a
reference to an OID that doesn't exist in the source, even though we already
fetch the refs from the target into the source.

Explicitly setting the source project as the place to get the merge index from
seems to prevent repository corruption in this way.
2017-05-12 20:47:51 +01:00
Valery Sizov e2a3a5095a Move update_assignee_cache_counts to the service 2017-05-12 14:12:29 +03:00
Sean McGivern a3607aa439 Merge branch 'issue_27168_2' into 'master'
Preloads head pipeline for each merge request

Closes #27168

See merge request !10064
2017-05-09 15:16:31 +00:00
Fatih Acet 0151325dac Merge request widget redesign 2017-05-09 04:15:34 +00:00
Felipe Artur 4ae411ff40 Preloads head pipeline for each merge request 2017-05-08 11:24:55 -03:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Douwe Maan f8fabfcc6f Allow commenting on older versions of the diff and comparisons between diff versions 2017-05-03 14:47:21 -05:00
mhasbini ccac05dd90 Fix 404 when upstream has disabled merge requests 2017-04-27 01:04:07 +03:00
Sean McGivern a0979c05fd Show correct size when MR diff overflows
The problem is that we often go via a diff object constructed from the diffs
stored in the DB. Those diffs, by definition, don't overflow, so we don't have
access to the 'correct' `real_size` - that is stored on the MR diff object
iself.
2017-04-25 16:54:10 +01:00
Sean McGivern 04a3e60e41 Merge branch 'dm-outdated-diff-link' into 'master'
Link to outdated diff in older MR version from outdated diff discussion

Closes #27865

See merge request !10572
2017-04-11 22:14:14 +00:00
Robert Speicher a1a94e739e Remove an unused `cared` scope from Issue and MergeRequest 2017-04-10 18:41:36 -04:00
Douwe Maan 50eae640db Fix specs and make tweaks 2017-04-08 14:37:46 -05:00
Douwe Maan 2c0de7aaaf Cache MR diffs by diff refs 2017-04-08 14:37:46 -05:00
Douwe Maan b202b42cfe Link to outdated diff in older MR version from outdated diff discussion 2017-04-08 14:37:46 -05:00
Luke "Jared" Bennett 8b98ca50b3
Merge branch 'master' into new-resolvable-discussion 2017-04-07 21:00:40 +01:00
Kushal Pandya 18506d4b8b Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
# Conflicts:
#   app/assets/javascripts/dispatcher.js
#   app/assets/stylesheets/pages/projects.scss
2017-04-06 09:46:50 +00:00
Douwe Maan c319f21141
Address review comments 2017-04-05 17:44:14 +01:00
Douwe Maan 2058e71e63
Extract commonalities between DiffDiscussion and LegacyDiffDiscussion 2017-04-05 17:44:14 +01:00
Douwe Maan 08bbb9fce6
Add option to start a new discussion on an MR 2017-04-05 17:44:14 +01:00
Douglas Barbosa Alexandre 20486593bd Skip MR metrics when importing projects from GitHub 2017-04-03 15:50:22 -03:00
James Edwards-Jones bf3cc824e4 Moved Project#protected_branch? to ProtectedBranch, similar for tags 2017-04-03 19:19:54 +01:00
Yorick Peterse 8cc4a39be8 Merge branch '22145-slow-search' into 'master'
Simplify projects, merge requests search queries

See merge request !10053
2017-03-24 12:27:54 +00:00
mhasbini df0603cf0e simplify projects, mrs search queries 2017-03-22 12:57:20 +02:00
Sean McGivern 1974691bfe Revert "Merge branch '29534-todos-performance' into 'master'"
This reverts merge request !10076
2017-03-21 15:25:00 +00:00
Jarka Kadlecova bf41a2e752 Todos performance: Include associations in Finder 2017-03-20 12:45:43 +01:00
Ruben Davila dd53a9c013 Include time tracking attributes in webhooks payload 2017-03-14 11:56:15 -05:00
Eric Eastwood 605fff9123 Default to subtle MR mege button until CI status is available
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9245
2017-03-02 02:49:03 -06:00
James Lopez a0101ebf84 Update occurrences of MWBS to MWPS
Rename column in the database
 Rename fields related to import/export feature
 Rename API endpoints
 Rename documentation links
 Rename the rest of occurrences in the code
 Replace the images that contain the words "build succeeds" and docs referencing to them
 Make sure pipeline is green and nothing is missing.

updated doc images

renamed only_allow_merge_if_build_succeeds in projects and fixed references

more updates

fix some spec failures

fix rubocop offences

fix v3 api spec

fix MR  specs

fixed issues with partials

fix MR spec

fix alignment

add missing v3 to v4 doc

wip - refactor v3 endpoints

fix specs

fix a few typos

fix project specs

copy entities fully to V3

fix  entity error

more fixes

fix failing specs

fixed missing entities in V3 API

remove comment

updated code based on feedback

typo

fix spec
2017-03-01 12:02:02 +01:00
Sean McGivern 2da8bc3de9 Only create unmergeable todos once
Previously, we created an unmergeable todo when a merge request:

1. Had merge when pipeline succeeds set.
2. Became unmergeable.

However, when merge when pipeline succeeds fails due to unmergeability,
the flag isn't actually removed. And a merge request can become
unmergeable multiple times, as every time the target branch is updated
we need to re-check the mergeable status. This means that if the todo
was marked done, and the MR was checked again, a new todo would be
created for the same event.

Instead of checking this, we should create the todo from the service
responsible for merging when the pipeline succeeds. That way the todo is
guaranteed to only be created when we care about it.
2017-02-24 17:18:12 +00:00
Robert Speicher 170fef0bd3 Merge branch 'dm-meer-blauw-op-straat' into 'master'
Enable (and disable) more RuboCops

See merge request !9432
2017-02-23 17:19:28 +00:00
Douwe Maan 56de781a2c Revert "Enable Style/DotPosition"
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.

# Conflicts:
#	.rubocop.yml
#	.rubocop_todo.yml
#	lib/gitlab/ci/config/entry/global.rb
#	lib/gitlab/ci/config/entry/jobs.rb
#	spec/lib/gitlab/ci/config/entry/factory_spec.rb
#	spec/lib/gitlab/ci/config/entry/global_spec.rb
#	spec/lib/gitlab/ci/config/entry/job_spec.rb
#	spec/lib/gitlab/ci/status/build/factory_spec.rb
#	spec/lib/gitlab/incoming_email_spec.rb
2017-02-23 09:33:19 -06:00
Douwe Maan 1fe7501b49 Revert "Prefer leading style for Style/DotPosition"
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan 206953a430 Prefer leading style for Style/DotPosition 2017-02-23 09:32:22 -06:00
Douwe Maan 030baf70d2 Enable Performance/RedundantMerge 2017-02-23 09:31:57 -06:00
Douwe Maan 3dadf306dd Enable Style/DotPosition 2017-02-23 09:31:56 -06:00
Sean McGivern 5a2c688117 Fix MR changes tab size count
This was wrong when there were over 100 files in the diff, because we
did not use the same diff options as subclasses of
`Gitlab::Diff::FileCollection::Base` when getting the raw diffs. (The
reason we don't use those classes directly is because they may perform
highlighting, which isn't needed for just counting the diffs.)
2017-02-23 12:03:08 +00:00
Dmitriy Zaporozhets 6676b4f0dd
Use Namespace#full_path instead of Namespace#path
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-14 18:38:20 +02:00
Jan Christophersen 217937e569 Show mentioned/issues being closed from a Merge Requests title 2017-02-13 16:47:47 +01:00
Sean McGivern 40704daad8 Merge branch 'restore-issues_mentioned_but_not_closing' into 'master'
pass in current_user in MergeRequest and MergeRequestsHelper

See merge request !8624
2017-02-08 12:35:04 +00:00
Douwe Maan 9d7c5e7584 Address feedback 2017-02-06 18:06:46 -06:00
Douwe Maan c8b63a28af Improve performance of finding last deployed environment 2017-02-06 16:12:24 -06:00
Douwe Maan 27f2ca9418 Add 'View on [env]' link to blobs and individual files in diffs 2017-02-06 16:12:23 -06:00
Dongqing Hu bbbef273f7 Remove MergeRequest#closes_issue?; Remove the default parameter value for #cache_merge_request_closes_issues! and #issues_mentioned_but_not_closing 2017-01-31 22:42:54 +08:00
Oswaldo Ferreira 0e14a2f21d Add commment to Issue, Project and MergeRequest #to_reference 2017-01-27 20:20:18 -02:00
Oswaldo Ferreira 660a755cad Change argument name assuming its always a Project 2017-01-27 20:20:18 -02:00
Sean McGivern 448321a46e Merge branch 'fix_broken_diff_discussions' into 'master'
Make diff discussions more reliable

Closes #23646

See merge request !8378
2017-01-25 09:54:34 +00:00
Sean McGivern d3f26be6f0 Merge branch '23524-notify-automerge-user-of-failed-build' into 'master'
Notify the user who set auto-merge when merge is not possible

Closes #23524

See merge request !8056
2017-01-19 11:05:38 +00:00
Dongqing Hu d0db72983e use the current_user parameter in MergeRequest#issues_mentioned_but_not_closing 2017-01-18 17:06:19 +08:00
twonegatives 85e0b99471 Notify the user who set auto-merge when merge conflict occurs 2017-01-14 12:22:30 +03:00
Jarka Kadlecova 7ab3dd4b30 support `/merge` slash comand for MRs 2017-01-11 08:48:07 -05:00
Mike Greiling ba5ba96f2b prevent 500 error when selecting changes tab for non-existent branch 2017-01-03 13:08:52 -06:00
James Lopez 112f470572 Fix cross-project references copy to include the project reference
Also added relevant specs and refactored to_references in a bunch of places to be more consistent.
2017-01-03 13:01:46 +01:00
Valery Sizov 95047f1dc7 Make diff discussion more reliable 2016-12-30 17:42:27 +02:00
Gabriel Gizotti 38dd9b545c use MergeRequest#closes_issues instead of rewriting code to retrieve closing issues on MergeRequest#issues_mentioned_but_not_closing 2016-12-28 23:22:31 +10:00
Sean McGivern ed6900caf1 Use raw_diffs to calculate MR files changed
We don't need to create the intermediate FileCollection object with its
associated highlighting in order to count how many files changed. Both
the compare object and the MR diff object have a raw_diffs method that
is perfectly fine for this case.
2016-12-26 14:27:20 +00:00
Rémy Coutable 8c8c4f8c5a Merge branch 'fix/import-export-mr-error' into 'master'
Fix import/export merge requests error

When MWBS is set and the MR exported/imported an error gets thrown. We should ignore this so it can succeed as the merge user may no longer exist in the target instance.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24009 and https://gitlab.com/gitlab-com/support-forum/issues/1345

See merge request !8134
2016-12-19 18:03:06 +00:00
James Lopez 0631c7bcdc Fix MR issue to do with merge user 2016-12-19 16:52:38 +01:00
Gabriel Gizotti 3e3d6b53dc Change closes issues reference text on MergeRequest#merge_commit_message to match existing text generated by the system 2016-12-16 19:15:07 +10:00
Gabriel Gizotti 7d7ae494d4 add guard clause to MergeRequest#issues_mentioned_but_not_closing 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 603ef5d49e Show either description or closes issues references on MergeRequest#merge_commit_message so closes issues references are not duplicated 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 4181528569 Better `Closes issues` text for MergeRequest#merge_commit_message 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 58609f842e backend completely drives creation of merge commit message 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 512c870ed4 Remove unnecessary code from MergeRequest#issues_mentioned_but_not_closing 2016-12-16 19:13:17 +10:00
Gabriel Gizotti b4764a8dd2 shorter lines on MergeRequest#merge_commit_message 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 0e76daf3da only look for issues mentioned on description on MergeRequest#issues_mentioned_but_not_closing 2016-12-16 19:13:17 +10:00
Gabriel Gizotti 1a8f43ff3e introduce MergeRequest#issues_mentioned_but_not_closing 2016-12-16 19:13:17 +10:00
Gabriel Gizotti e52e3ab508 Remove whole description from #merge_commit_message and add add closed issues 2016-12-16 19:13:17 +10:00
Douwe Maan 12db4cc0e7 Merge branch 'jej-note-search-uses-finder' into 'security'
Fix missing Note access checks in by moving Note#search to updated NoteFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

⚠️ - Potentially untested  
💣 - No test coverage  
🚥 - Test coverage of some sort exists (a test failed when error raised)  
🚦 - Test coverage of return value (a test failed when nil used)  
 - Permissions check tested

### Note lookup without access check

- [x]  app/finders/notes_finder.rb:13 :download_code check
- [x]  app/finders/notes_finder.rb:19 `SnippetsFinder`
- [x]  app/models/note.rb:121 [`Issue#visible_to_user`]
- [x]  lib/gitlab/project_search_results.rb:113
  - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`.
  - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked.

### Previous discussions
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used
  - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223

###  Acceptance criteria met?
- [x] Tests added for new code
- [x] TODO comments removed
- [x] Squashed and removed skipped tests
- [x] Changelog entry
- [ ] State Gitlab versions affected and issue severity in description
- [ ] Create technical debt issue for NotesFinder.
  - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two.
  - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)`
  - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes`

See merge request !2035
2016-12-15 11:40:12 -03:00
Adam Niedzielski 9190cea215 Do not reload diff for merge request made from fork when target branch in fork is updated
The target branch of a merge request has to be a branch in the project
for which the merge request is submitted. When a branch changes in a fork,
it does not make sense to reload diffs of merge requests in the upstream
project that use the same branch name as the target branch.
Please note that it does make sense to reload diffs when the source branch
changes.
2016-12-09 12:10:26 +01:00
Douwe Maan f23b1cb453 Merge branch 'jej-23867-use-mr-finder-instead-of-access-check' into 'security'
Replace MR access checks with use of MergeRequestsFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

⚠️ - Potentially untested
💣 - No test coverage
🚥 - Test coverage of some sort exists (a test failed when error raised)
🚦 - Test coverage of return value (a test failed when nil used)
 - Permissions check tested

- [x] 💣  app/finders/notes_finder.rb:17
- [x] ⚠️  app/views/layouts/nav/_project.html.haml:80 [`.count`]
- [x] 💣  app/controllers/concerns/creates_commit.rb:84
- [x] 🚥  app/controllers/projects/commits_controller.rb:24
- [x] 🚥  app/controllers/projects/compare_controller.rb:56
- [x] 🚦  app/controllers/projects/discussions_controller.rb:29
- [x]   app/controllers/projects/todos_controller.rb:27
- [x] 🚦  app/models/commit.rb:268
- [x]  lib/gitlab/search_results.rb:71

- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_267_266 Memoize ` merged_merge_request(current_user)`
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_248_247 Expected side effect for `merged_merge_request!`, consider `skip_authorization: true`.
- [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#d1c10892daedb4d4dd3d4b12b6d071091eea83df_269_269 Scary use  of unchecked `merged_merge_request?`

See merge request !2033
2016-12-08 21:42:07 -03:00
Sean McGivern d9ef41cf4d Merge branch '23589-open-issue-for-mr' into 'master'
Create an issue for all unresolved discussions in an MR

See merge request !7180
2016-12-06 14:04:14 +00:00
Bob Van Landuyt 1123057ab7 Feature: delegate all open discussions to Issue
When a merge request can only be merged when all discussions are
resolved. This feature allows to easily delegate those discussions to a
new issue, while marking them as resolved in the merge request.

The user is presented with a new issue, prepared with mentions of all
unresolved discussions, including the first unresolved note of the
discussion, time and link to the note.

When the issue is created, the discussions in the merge request will get
a system note directing the user to the newly created issue.
2016-12-05 20:55:45 +01:00
Oswaldo Ferreira f272ee6eba Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
Adam Niedzielski cb6f8cdfc2 Replace references to MergeRequestDiff#commits with st_commits
when we care only about the number of commits

We do not have to instantiate all objects in this case.
2016-12-01 12:17:30 +01:00
Grzegorz Bizon a49e9949c6 Rename `MergeRequest#pipeline` to `head_pipeline` 2016-11-29 14:12:49 +01:00
Adam Niedzielski d9a2093e7e Prevent error when submitting a merge request and pipeline is not defined 2016-11-28 12:03:59 +01:00
Douwe Maan d8f7523368 Merge branch 'events-cache-invalidation' into 'master'
Remove caching of events data

This MR removes the caching of events data as this was deemed unnecessary while increasing load on the database. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037 and 5371da341e for more information.

See merge request !6578
2016-11-28 03:34:12 +00:00
Yorick Peterse 5371da341e
Remove event caching code
Flushing the events cache worked by updating a recent number of rows in
the "events" table. This has the result that on PostgreSQL a lot of dead
tuples are produced on a regular basis. This in turn means that
PostgreSQL will spend considerable amounts of time vacuuming this table.
This in turn can lead to an increase of database load.

For GitLab.com we measured the impact of not using events caching and
found no measurable increase in response timings. Meanwhile not flushing
the events cache lead to the "events" table having no more dead tuples
as now rows are only inserted into this table.

As a result of this we are hereby removing events caching as it does not
appear to help and only increases database load.

For more information see the following comment:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6578#note_18864037
2016-11-23 14:17:07 +01:00
Douwe Maan f2a0c6f6bf Correctly determine mergeability of MR with no discussions 2016-11-23 20:02:14 +08:00
Rémy Coutable 1a5eedf3fe
Fix a wrong "The build for this merge request failed" message
Also allow merge request to be merged with skipped pipeline and the
"only allow merge when pipeline is green" feature enabled

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-21 14:22:28 +01:00
Grzegorz Bizon 5328e3b127 Make commit an optional arg for environments search 2016-11-09 14:46:36 +01:00
Rodolfo Santos 1db9f826c1 Add setting to only allow merge requests to be merged when all discussions are resolved
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-04 14:58:40 +01:00
Rémy Coutable 46689162a3 Ensure merge request's "remove branch" accessors return booleans
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-03 18:29:00 +01:00
Guilherme Salazar 32913b74b8 add "x of y tasks completed" on issuable
fix issues pointed out in !6527

add task completion status feature to CHANGELOG
2016-10-28 14:01:36 -02:00
David Wagner 03b6108f6f Remove redundant class_name and foreign_key overrides
They were Rails' default and are unnecessarily overridden.

Signed-off-by: David Wagner <david@marvid.fr>
2016-10-24 22:29:48 +02:00
Nick Thomas 61536ed2cf Rename forked_source_project_missing? to source_project_missing? 2016-10-20 12:24:27 +01:00
Nick Thomas 374071321d Fix the merge request view when source projects or branches are removed 2016-10-20 12:24:27 +01:00
Nick Thomas e6f515ecbe Revert "Add #closed_without_source_project?"
This reverts commit 31c37c6c38.

See #23341
2016-10-20 01:31:54 +01:00
Douglas Barbosa Alexandre fc2c64fcdf Add self.project_foreign_key on both Issue and MergeRequest 2016-10-19 14:58:28 -02:00
Grzegorz Bizon 72d84e4851 Improve code that creates a list of commits for MR 2016-10-18 08:32:17 -05:00
Grzegorz Bizon ab8ef17fb2 Extend merge request tests for all commits method 2016-10-18 08:32:17 -05:00
Grzegorz Bizon d5b1d0ea50 Use temporary compare commits when MR not persisted 2016-10-18 08:32:17 -05:00
Sean McGivern 86dcb79be3 Merge branch 'master' into merge-conflicts-editor-2 2016-10-17 10:56:55 +01:00
Z.J. van de Weg fa58068b28 Refactor ci_status on MergeRequestController 2016-10-14 11:07:01 +02:00
Z.J. van de Weg 8a1064d762 Fix indenting error in HAML 2016-10-14 11:07:00 +02:00
Z.J. van de Weg 6a4f710083 Show what time ago a MR was deployed 2016-10-14 11:07:00 +02:00
Sean McGivern 3f71c43e88 Allow setting content for resolutions
When reading conflicts:

1. Add a `type` field. `text` works as before, and has `sections`;
   `text-editor` is a file with ambiguous conflict markers that can only
   be resolved in an editor.
2. Add a `content_path` field pointing to a JSON representation of the
   file's content for a single file.
3. Hitting `content_path` returns a similar datastructure to the `file`,
   but without the `content_path` and `sections` fields, and with a
   `content` field containing the full contents of the file (with
   conflict markers).

When writing conflicts:

1. Instead of `sections` being at the top level, they are now in a
   `files` array. This matches the read format better.
2. The `files` array contains file hashes, each of which must contain:
   a. `new_path`
   b. `old_path`
   c. EITHER `sections` (which works as before) or `content` (with the
      full content of the resolved file).
2016-10-13 14:16:34 -05:00
Paco Guzman ca3c0c6cd9 MergeRequest new form load diff asynchronously 2016-10-06 11:19:14 +02:00
Felipe Artur 45bfadbcbf Fix bug when trying to cache closed issues from external issue trackers 2016-10-03 19:58:49 -03:00
Thomas Balthazar ddbe676dc3 Add a /wip slash command
It toggles the 'WIP' prefix in the MR title.
2016-10-03 09:36:21 +02:00
Robert Speicher b007bd8101 Improve how MergeCommit#merge_commit_message builds the message
Now a merge request with a blank description will no longer produce a
merge commit message like this:

```
Merge branch 'foo' into 'master'

Bring the wonders of foo into the world

See merge request !7283
```

What an improvement! 🎉
2016-09-27 14:04:41 +02:00
Rémy Coutable 529b17d11c Merge branch 'show-all-pipelines-from-all-diffs' into 'master'
Show all pipelines from all merge_request_diffs

This way we could also show pipelines from commits which
were discarded due to a force push.

Closes #21889

See merge request !6414
2016-09-21 13:15:41 +00:00
Kamil Trzcinski 955b9347a4 Add tests to verify the correctness of returned environments 2016-09-21 12:08:11 +02:00
Kamil Trzcinski d891051cd2 Limit number of shown environments for Merge Requests
- For target project show only environments for target branch or with tags
- For source project show only environments for source branch
2016-09-21 10:23:16 +02:00
Timothy Andrew 68e1b5bbc0 Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues`
- Instead of overriding `create` and `update` in `MergeRequests::BaseService`
- Get all merge request service specs passing
2016-09-21 01:22:20 +05:30
Timothy Andrew 918e589c2b Implement a second round of review comments from @DouweM.
- Don't use `TableReferences` - using `.arel_table` is shorter!
- Move some database-related code to `Gitlab::Database`
- Remove the `MergeRequest#issues_closed` and
  `Issue#closed_by_merge_requests`  associations. They were either
  shadowing or were too similar to existing methods. They are not being
  used anywhere, so it's better to remove them to reduce confusion.
- Use Rails 3-style validations
- Index for `MergeRequest::Metrics#first_deployed_to_production_at`
- Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
  need it.
- Other minor refactorings.
2016-09-21 00:47:37 +05:30