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

Bitbucket Pull request shows outdated commit hash after pushing.

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Gathering Interest (View Workflow)
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Pull Requests
    • Labels:
      None
    • UIS:
      35
    • Feedback Policy:
      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

       

      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

              Assignee:
              Unassigned
              Reporter:
              corey26 Corey Steele
              Votes:
              12 Vote for this issue
              Watchers:
              15 Start watching this issue

                Dates

                Created:
                Updated: