Commit Graph

22 Commits

Author SHA1 Message Date
GitLab Bot 65c71039eb Add latest changes from gitlab-org/gitlab@master 2022-02-02 15:17:50 +00:00
GitLab Bot 5a71c032e8 Add latest changes from gitlab-org/gitlab@master 2021-10-07 18:11:28 +00:00
GitLab Bot 96ee4961ce Add latest changes from gitlab-org/gitlab@master 2021-08-30 12:09:48 +00:00
GitLab Bot 1930898566 Add latest changes from gitlab-org/gitlab@master 2021-08-02 09:10:09 +00:00
GitLab Bot f4d51a9f71 Add latest changes from gitlab-org/gitlab@master 2021-07-29 15:09:48 +00:00
GitLab Bot 3e7f2f00ca Add latest changes from gitlab-org/gitlab@master 2021-05-12 03:10:21 +00:00
GitLab Bot 874d5e8019 Add latest changes from gitlab-org/gitlab@master 2021-01-27 18:09:08 +00:00
GitLab Bot f7ae5366cc Add latest changes from gitlab-org/gitlab@master 2021-01-18 21:11:05 +00:00
GitLab Bot 04698e448a Add latest changes from gitlab-org/gitlab@master 2021-01-14 03:10:47 +00:00
GitLab Bot 3775eba7c1 Add latest changes from gitlab-org/gitlab@master 2020-10-16 12:09:33 +00:00
GitLab Bot b17f0b91a6 Add latest changes from gitlab-org/gitlab@master 2020-10-12 15:08:32 +00:00
GitLab Bot 6bab37419c Add latest changes from gitlab-org/gitlab@master 2020-09-29 21:09:35 +00:00
GitLab Bot 02b76fefbc Add latest changes from gitlab-org/gitlab@master 2020-07-24 00:09:34 +00:00
GitLab Bot b7c735c8ac Add latest changes from gitlab-org/gitlab@master 2020-04-15 12:09:18 +00:00
GitLab Bot c859c3bfd2 Add latest changes from gitlab-org/gitlab@master 2020-01-21 15:08:26 +00:00
Oswaldo Ferreira f4cd926cf3 Add exclusive lease to mergeability check process
Concurrent calls to UserMergeToRef RPC updating a single ref
can lead to an opaque fail that is being rescued at Gitaly.

So this commit adds an exclusive lease to the mergeability
check process with the key as the current MR ID.
2019-07-31 19:58:43 -03:00
Oswaldo Ferreira 74a3e6b712 Avoid touching the MR status if MR is not opened 2019-06-21 11:30:09 -03:00
Oswaldo Ferreira 1f0b50c418 Only force recheck when merge-ref is outdated
When recheck flag is true, we make sure the merge-ref
is indeed outdated. If it is, we update it along
the merge status.
2019-06-20 14:47:34 -03:00
Oswaldo Ferreira 3af348b6cf Automatically update MR merge-ref along merge status
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
2019-06-20 11:48:30 -03:00
Oswaldo Ferreira 00a273d3a9 Revert "Automatically update MR merge-ref along merge status" 2019-06-11 13:08:25 -03:00
Oswaldo Ferreira 4246a62118 Add payload to the service response
This introduces payload to the ServiceResponse with
the merge ref HEAD commit data
2019-05-31 19:16:01 -03:00
Oswaldo Ferreira b965009ddd Automatically update MR merge-ref along merge status
This couples the code that transitions the `MergeRequest#merge_status`
and refs/merge-requests/:iid/merge ref update.

In general, instead of directly telling `MergeToRefService` to update
the merge ref, we should rely on `MergeabilityCheckService` to keep
both the merge status and merge ref synced. Now, if the merge_status is
`can_be_merged` it means the merge-ref is also updated to the latest.

We've also updated the logic to be more systematic and less user-based.
2019-05-31 19:16:01 -03:00