Support merge ref writing (without merging to target branch)
This is the Gitaly counterpart for https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24692 and gitaly-proto!261 (merged).
It adds a new RPC which allows a merge between a source SHA and a target branch, but instead changing the target branch, we're aiming to write it in a target_ref
. Mainly, we're looking forward to use the refs/merge-requests/:iid/merge
namespace.
In order to make the RPC idempotent, we always trash the given target_ref
before writing the commit on it.
Merge request reports
Activity
changed milestone to %11.8
Codecov Report
Merging #1057 into master will increase coverage by
0.01%
. The diff coverage is73.91%
.@@ Coverage Diff @@ ## master #1057 +/- ## ========================================== + Coverage 73.31% 73.33% +0.01% ========================================== Files 219 219 Lines 6914 6934 +20 ========================================== + Hits 5069 5085 +16 - Misses 1180 1182 +2 - Partials 665 667 +2
Flag Coverage Δ #unittests 73.33% <73.91%> (+0.01%)
Impacted Files Coverage Δ internal/service/remote/list_remotes.go 0% <0%> (ø)
internal/service/operations/merge.go 75.38% <80.95%> (+2.05%)
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0471ab5...5be9317. Read the comment docs.Edited by Codecovadded 16 commits
-
c5c5be31...cda65f52 - 15 commits from branch
master
- 79810170 - Allow merging to a ref without changing the target branch
-
c5c5be31...cda65f52 - 15 commits from branch
added 1 commit
- bd262fbc - Allow merging to a ref without changing the target branch
added 1 commit
- d1e55f2e - Allow merging to a ref without changing the target branch
added Create [DEPRECATED] label
- Resolved by Oswaldo Ferreira
added 1 commit
- 58d6bceb - Allow merging to a ref without changing the target branch
- Resolved by Oswaldo Ferreira
- Resolved by Oswaldo Ferreira
added 1 commit
- 54fa5804 - Allow merging to a ref without changing the target branch
- Resolved by Oswaldo Ferreira
@johncai I wonder if you could have the first review on this one? I've left a few comments with additional context :)
Edit: Note that the failure is due to not having gitaly-proto!261 (merged) merged. So'll assign it to you as well!
Edited by Oswaldo Ferreiraassigned to @johncai
- Resolved by Oswaldo Ferreira
- Resolved by Oswaldo Ferreira
- Resolved by Oswaldo Ferreira
@oswaldo this is mainly for my own education and context, but how is this RPC different than the
UserMergeBranch
RPC?assigned to @oswaldo
- Resolved by Oswaldo Ferreira
this is mainly for my own education and context, but how is this RPC different than the
UserMergeBranch
RPC?The
UserMergeBranch
is mainly used for merging the source SHA into the given target branch, whileUserDryMergeToRef
is focused on making the merge of source SHA and branch into the given target REF instead.this is also for my own education and context. what does "Dry" mean here exactly?
The idea of "dry" is not actually changing the target branch. As a sort of test run. But I think omiting the dry sounds better after all.
We've discussed a bit on https://gitlab.com/gitlab-org/gitlab-ce/issues/47110#note_134156788. You might extract extra bits of context there ;)
added 1 commit
- d3960dad - Allow merging to a ref without changing the target branch
mentioned in merge request gitaly-proto!261 (merged)
added 1 commit
- 1cbb5165 - Allow merging to a ref without changing the target branch
added 8 commits
-
1cbb5165...0471ab52 - 7 commits from branch
master
- ab8127ea - Allow merging to a ref without changing the target branch
-
1cbb5165...0471ab52 - 7 commits from branch
added 1 commit
- be02fa10 - Allow merging to a ref without changing the target branch
@johncai Can you take another look? Left some context for you at !1057 (comment 138326482). Also FYI I've renamed
UserDryMergeToRef
toUserMergeToRef
.assigned to @johncai
- Resolved by Oswaldo Ferreira
assigned to @jschatz1
assigned to @jacobvosmaer-gitlab
added 1 commit
- 4d68577a - Allow merging to a ref without changing the target branch