#8214 Compute merge request commits in background

v1.9.0
closed
General
nobody
2018-09-24
2018-06-29
No

We added caching to merge requests' list of commits previously (allura.model.repository.MergeRequest#commits). But it still can sometimes be slow the very first time. This is particularly a problem when creating the merge request and there's been no chance for it to get cached.

  • if 'commits' are available (cached), show them on the page just like we do now
  • if they aren't, return the page without them.
  • start a background task to get them
  • use ajax to fetch the bg tasks results when complete, and insert them into the page

There is a similar pattern in place already for seeing if the commits are cleanly mergeable (see "merge_task_status")

Discussion

  • Dave Brondsema

    Dave Brondsema - 2018-07-02
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2018-07-02

    Done on db/8214

    Note: when logged in as an admin, you'll see one-click merge button and the bg checks happening for that too. Doing a merge-request as a non-admin user will be a more common scenario.

    To simulate a very slow task, you can stop taskd processes before submitting the merge request, and then start them again a bit later.

     
  • Kenton Taylor

    Kenton Taylor - 2018-07-09
    • status: review --> closed
     
  • Kenton Taylor

    Kenton Taylor - 2018-07-09

    Merged.

     
  • Dave Brondsema

    Dave Brondsema - 2018-09-24
    • Milestone: unreleased --> v1.9.0
     

Log in to post a comment.