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

Fetch refs/pull-requests/<number>/from intermittently takes several minutes to become available

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • 3.3.0
    • Pull Requests
    • None

    Description

      When a pull request is created in Stash, there is a ref in the format of refs/pull-requests/<number>/from which becomes available while the PR is open.

      The process of how to do this was from these sources:

      The method of how we do this is from the Atlassian blog post above:

      # Example for a PR with number "239"
      git fetch origin pull-requests/239/from:pr/239/from
      git checkout pr/239/from
      

      However, recently we have noticed that this ref occasionally takes upto 5 minutes to become available after the PR is created. When this happens our automated CI returns with an error like:
      fatal: Couldn't find remote ref pull-requests/<number>/from (where <number> is the PR number)

      A similar error occurs if we try to fetch the specific hash we know is in the pull request:
      fatal: reference is not a tree: XXXXXX (where XXXXX is the specific hash)

      If we wait up to 5 minutes when this happens, the refs of both formats above become available. We are hosting stash on a pretty big machine.

      This issue is making CI difficult, as we block pull requests until the CI job is run and successful. Waiting around for 5 or more minutes before we can start any jobs gets in the way of engineers.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ac94e5e113e9 dave trulia
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: