Commit Graph

14 Commits

Author SHA1 Message Date
GitLab Bot 01ef10900a Add latest changes from gitlab-org/gitlab@master 2021-07-15 06:09:39 +00:00
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot f35a7a3b8e Add latest changes from gitlab-org/gitlab@master 2020-05-07 15:09:29 +00:00
GitLab Bot 727b1a890c Add latest changes from gitlab-org/gitlab@master 2020-01-16 21:08:24 +00:00
GitLab Bot eca3cd3a9e Add latest changes from gitlab-org/gitlab@master 2019-11-15 18:06:24 +00:00
dineshpanda ee1633e383 Avoid calling freeze on already frozen strings in app/services 2019-09-04 09:21:21 +05:30
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
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
gfyoung fbde835404 Enable more frozen string in app/services/**/*.rb
Partially addresses #47424.
2018-07-17 15:19:40 -07:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
Sean McGivern 1860ef7dd4 Add extra logging to githost.log when rebasing 2018-06-28 06:14:30 +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