Commit graph

20 commits

Author SHA1 Message Date
GitLab Bot
bdca097916 Add latest changes from gitlab-org/gitlab@master 2020-08-11 03:11:00 +00:00
GitLab Bot
4c5468b408 Add latest changes from gitlab-org/gitlab@master 2020-06-24 15:08:50 +00:00
GitLab Bot
f35a7a3b8e Add latest changes from gitlab-org/gitlab@master 2020-05-07 15:09:29 +00:00
GitLab Bot
cebee31a04 Add latest changes from gitlab-org/gitlab@master 2020-02-04 06:09:13 +00:00
GitLab Bot
727b1a890c Add latest changes from gitlab-org/gitlab@master 2020-01-16 21:08:24 +00:00
GitLab Bot
b3e4ec8e8a Add latest changes from gitlab-org/gitlab@master 2019-10-23 09:06:03 +00:00
Nick Thomas
d31b733fee Only read rebase status from the model
Prior to 12.1, rebase status was looked up directly from Gitaly. In
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14417 , a DB
column was added to track the status instead. However, we couldn't stop
looking at the gitaly status immediately, since some rebases may been
running across the upgrade.

Now that we're in 12.3, it is safe to remove the direct-to-gitaly
lookup. This also happens to fix a 500 error that is seen when viewing
an MR for a fork where the source project has been removed.

We still look at the Gitaly status in the service, just in case Gitaly
and Sidekiq get out of sync - I assume this is possible, and it's a
relatively cheap check.

Since we atomically check and set `merge_requests.rebase_jid`, we
should never enqueue two `RebaseWorker` jobs in parallel.
2019-08-15 18:54:08 +00:00
Nick Thomas
381468d0cc
Allow asynchronous rebase operations to be monitored
This MR introduces tracking of the `rebase_jid` for merge requests. As
with `merge_ongoing?`, `rebase_in_progress?` will now return true if a
rebase is proceeding in sidekiq.

After one release, we should remove the Gitaly-based lookup of rebases.
It is much better to track this kind of thing via the database.
2019-07-04 08:50:55 +01:00
Nick Thomas
22f8da985a
Fix a broken spec for EE 2019-05-16 11:54:56 +01:00
Stan Hu
5632079c36 Properly clear the merge error upon rebase failure
If `merge_error` is ever set after a failure, it is never cleared, even
after a subsequent, successful rebase. We now clear this field whenever
a successful rebase occurs.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56139
2019-05-15 21:34:59 -07:00
Luke Duncalfe
49cb4b3dfc Add support for two-step Gitaly Rebase RPC
The new two-step Gitaly `Rebase` RPC yields the rebase commit SHA to the
client before proceeding with the rebase.

This avoids an issue where the rebase commit SHA was returned when the
RPC had fully completed, and in some cases this would be after the Rails
`post_receive` worker services had already run. In these situations,
the merge request did not yet have its rebase_commit_sha attribute set
introducing the possibility for bugs (such as previous approvals being
reset).

https://gitlab.com/gitlab-org/gitlab-ee/issues/5966
2019-05-02 17:30:07 +00:00
Thong Kuah
85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12:00
George Tsiolis
f611493912 Fix committer typo 2018-09-25 11:51:07 +03:00
Mark Chao
a63bce1a4b Resolve "Rename the Master role to Maintainer" Backend 2018-07-11 14:36:08 +00:00
Jacob Vosmaer (GitLab)
15aadc665f Make OperationService RPC's mandatory 2018-07-03 09:12:03 +00:00
Alejandro Rodríguez
98affa75ed Refactor Gitlab::Git code related to LFS changes for Gitaly migration
We stop relying on Gitlab::Git::Env for the RevList class, and use
Gitlab::Git::Repository#run_git methods inteaad. The refactor also fixes
another issue, since we now top using "path_to_repo" (which is a
Repository model method).
2018-02-02 16:27:01 -03:00
Robert Speicher
587242656f Merge branch 'feature/migrate-rebase-to-gitaly' into 'master'
Migrate Gitlab::Git::Repository#rebase to Gitaly

Closes gitaly#863

See merge request gitlab-org/gitlab-ce!16259
2018-01-11 22:24:50 +00:00
Ahmad Sherif
42265d445f Migrate Gitlab::Git::Repository#rebase to Gitaly
Closes gitaly#863
2018-01-10 13:28:10 +01:00
Jan Provaznik
a560f785f7 Store only generic message if rebase fails
Instead of storing detailed rebase error, only a generic message is
stored with MR. The reason is that this message is exposed and displayed
to end user and there is no reason to expose detailed backend
information. Error message is still logged so detailed information
can be found in logfile by admin if needed.

Related #41820
2018-01-09 17:04:28 +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