Skip to content
Snippets Groups Projects

Support merge ref writing (without merging to target branch)

Merged Oswaldo Ferreira requested to merge osw-support-dry-merge-to-ref into master

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.

Edited by GitLab Release Tools Bot

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • 58d6bceb - Allow merging to a ref without changing the target branch

    Compare with previous version

  • Oswaldo Ferreira
  • Oswaldo Ferreira changed the description

    changed the description

  • added 1 commit

    • 54fa5804 - Allow merging to a ref without changing the target branch

    Compare with previous version

  • Author Contributor

    @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 Ferreira
  • John Cai
  • John Cai
  • John Cai
  • Contributor

    @oswaldo this is mainly for my own education and context, but how is this RPC different than the UserMergeBranch RPC?

  • assigned to @oswaldo

  • John Cai
  • Author Contributor

    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, while UserDryMergeToRef 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 ;)

  • Oswaldo Ferreira marked as a Work In Progress

    marked as a Work In Progress

  • added 1 commit

    • d3960dad - Allow merging to a ref without changing the target branch

    Compare with previous version

  • mentioned in merge request gitaly-proto!261 (merged)

  • added 1 commit

    • 1cbb5165 - Allow merging to a ref without changing the target branch

    Compare with previous version

  • Oswaldo Ferreira added 8 commits

    added 8 commits

    Compare with previous version

  • added 1 commit

    • be02fa10 - Allow merging to a ref without changing the target branch

    Compare with previous version

  • Author Contributor

    @johncai Can you take another look? Left some context for you at !1057 (comment 138326482). Also FYI I've renamed UserDryMergeToRef to UserMergeToRef.

  • John Cai approved this merge request

    approved this merge request

  • assigned to @jschatz1

  • added 1 commit

    • 4d68577a - Allow merging to a ref without changing the target branch

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading