Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3903

Pull Requests merge queue

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Answered
    • None
    • Pull Request - Merge
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      Follow this unanswered question in Atlassian Answers, i describe my thoughts here.

      https://answers.atlassian.com/questions/212418/reduce-of-rebuilding-automerge-commits

      The problem:
      Stash create refs/pull-requests/1234/merge-clean reference lazily after branches from and to has been updated in PR and PR request is reviewed. If your continues integration server look for merge-clean references it start retest such commit on every update.

      There are case, then, if you already tested Automerge commit before and you pull request has been rebuilded (other one is merged) and you lost all these tests, you need to wait until you get new tests completed. In our case it takes a hour per each platform. But a hour at least. Then you get next pull request merged and so on. Rebuilding green pull requests again and again. Because Automerge commit updated on everyone pull request merged.

      Solution:
      Some plugin, is to have to add special reference and hook per repo:
      `refs/pull-requests/1234/queue/to` and `refs/pull-requests/1234/queue/merge-clean`

      If `queue/to` ref is equals to original `to`, plugin will replace original `merge` references to `queue/merge-clean` sha1 hash. And then try to merge again.

      In other pull requests link `queue\to` is pointed to parent Pull Requests reference to, like a linked list.

      In case if all pull requests has Automerge green on continues integration – all of them can be merged without rebuilding Automerge commit. Just fast-forward `to` branch to last green in queue.

      If someone PR is red on Automerge with queue, this pull request is putted into end of queue and all tail of queue rebuild Automerge commits again. Not all of rest, but only a tail from first red Automerge commit.

      Sure this can be a plugin. And we are developing it now. But how you think, maybe it must be in core of Stash?

      Attachments

        Activity

          People

            Unassigned Unassigned
            3652ed9ede2e Alexey Efimov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: