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

Bitbucket Pull request shows outdated commit hash after pushing.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • High
    • 7.12.0
    • 7.0.0
    • Pull Requests

    Description

       

      Reproduction steps:
      1) Create a branch “x” and create a pull request
      2) while True: (run these steps on a script until you notice that the hashes don’t match up)
      git commit —amend —no-edit # hashes change at this point.
      git push origin x -f
      if PR commit != the actual branch commit:
      break # found the bug

      Notes:
      When someone unrelated to the PR pushes an unrelated commit to master (as opposed to the PR branch) it seems Bitbucket goes through its ref cache and updates them. At this time the PR decides to update its commit. This puts the PR in the expected and correct state. [1]

      I suspect Bitbucket has some sort of cache or db of “ref -> sha” mapping. This mapping seems to not being updated or triggered correctly on every push.
      I suspect that the reason the scenario above [1] works because another (potentially unrelated) push is correctly updating this mapping and therefere causing PR’s to fall into a correct state.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              4c762d6af390 Corey Steele
              Votes:
              16 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: