Commit graph

15 commits

Author SHA1 Message Date
Stan Hu
1b7ab11f94 Omit issues links in merge request entity API response
The merge request widget has a section that includes which issues may be
closed or mentioned based on the merge request description. The problem
is that rendering and redacting Markdown can be expensive, especially
since the browser polls for the data every 10 seconds.

Since these links don't change much and are just nice to have, we only
load them on first page load. The frontend will use the existing data if
the data doesn't appear on subsequent requests.

This saves about 30% of the rendering time of this endpoint, which adds
up to significant savings considering that
`MergeRequestsController#show.json` is called over a million times a day
on GitLab.com.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63546
2019-06-20 15:59:41 -07:00
Shinya Maeda
d4b4693663 Abstract auto merge processes
We have one auto merge strategy today - Merge When Pipeline
Succeeds.

In order to add more strategies for Merge Train feature,
we abstract the architecture to be more extensible.

Removed arguments

Fix spec
2019-06-03 13:15:29 +07:00
Thong Kuah
4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Shinya Maeda
a04e1d5e32 Backport EE change
This is for merge request pipelines
2019-04-02 15:55:06 +07:00
Luke Duncalfe
38bf176c3c Enrich commits with full data in CommitCollection
Allow incomplete commit records to load their full data from gitaly.

Commits can be based on a Hash of data retrieved from PostgreSQL, and
this data can be intentionally incomplete in order to save space.

A new method #gitaly? has been added to Gitlab::Git::Commit, which
returns true if the underlying data source of the Commit is a
Gitaly::GitCommit.

CommitCollection now has a method #enrich which replaces non-gitaly
commits in place with commits from gitaly.

CommitCollection#without_merge_commits has been updated to call this
method, as in order to determine a merge commit we need to have parent
data.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/58805
2019-03-22 10:26:15 +13:00
Luke Duncalfe
2b7dd017af Allow custom squash commit messages 2019-02-06 12:33:11 +00:00
Kamil Trzciński
d4c7214799
[master] Pipelines section is available to unauthorized users 2019-01-31 16:52:50 +01:00
Alessio Caiazza
dadc046d3a post merge pipeline and environments status 2018-10-29 11:34:41 +00:00
Bob Van Landuyt
f3fba178b9 Remove the ForkedProjectLink model
This removes the `ForkedProjectLink` model that has been replaced by
the `ForkNetworkMember` and `ForkNetwork` combination. All existing
relations have been adjusted to use these new models.

The `forked_project_link` table has been dropped.

The "Forks" count on the admin dashboard has been updated to count all
`ForkNetworkMember` rows and deduct the number of `ForkNetwork`
rows. This is because now the "root-project" of a fork network also
has a `ForkNetworkMember` row. This count could become inaccurate when
the root of a fork network is deleted.
2018-10-19 11:57:20 +02:00
Phil Hughes
3a77664d1a Allow merge requests from forks to be opened in Web IDE
Closes #47460
2018-07-12 12:14:49 +02:00
Alejandro Rodríguez
c277aac9dc Don't do a commit lookup to present the MR entity, just return the sha
The MergeRequestWidgetEntity is used a lot in AJAX requests, and shaving
that git operation will hopefully translate in a performance improvement
2018-03-06 22:49:50 -03: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
Oswaldo Ferreira
feee48a4cf Fixes spec failures due to not returning metrics for MRs other than closed/merged 2018-01-02 19:27:00 -02:00
Oswaldo Ferreira
bf8c20729b Cache merged and closed events data in merge_request_metrics table 2018-01-02 17:45:25 -02:00
Oswaldo Ferreira
cba40a1f55 Stop sending milestone and labels data over the wire for MR widget
requests
2017-12-15 15:31:16 -02:00
Renamed from spec/serializers/merge_request_entity_spec.rb (Browse further)