• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 5.4.0, 4.14.10, 5.0.8, 5.1.6, 5.2.4, 5.3.2
    • 4.14.0, 5.0.0, 5.1.0, 5.2.0, 5.1.2
    • None
    • None

      Set up an instance of Bitbucket Server which is a Smart Mirror of a repository on bitbucket.org

      Merge a PR, making sure to have the option selected for "Close source branch".

      Expected behaviour is that the updates are synced to the mirror. Actual behaviour is that they updates may not be synced (not even when the scheduled task runs to sync).

      Workaround is to push a new commit to the repo (or tag the PR branch, to trigger a new commit), which does sync the latest changes to the mirror.

            [BSERV-9989] Smart mirror failing to sync after merging PR

            When the PR is merged, two "push event" requests are being sent from bitbucket.org to BBS.

            The set of changes in one of the requests is successfully applied.

            The set of changes in the second request is not successfully applied, and it does not schedule any fetch.

            Then the timestamp is updated on the mirror repo, matching the one on the upstream. Since the timestamp is used by the scheduled job to determine if there are any differences between the mirror and upstream, and the timestamps are the same, no further sync is done - unless further changes are made to the upstream repo.

            Note that there is no endpoint or other mechanism to trigger a sync on the mirror

            Frank Doherty added a comment - When the PR is merged, two "push event" requests are being sent from bitbucket.org to BBS. The set of changes in one of the requests is successfully applied. The set of changes in the second request is not successfully applied, and it does not schedule any fetch. Then the timestamp is updated on the mirror repo, matching the one on the upstream. Since the timestamp is used by the scheduled job to determine if there are any differences between the mirror and upstream, and the timestamps are the same, no further sync is done - unless further changes are made to the upstream repo. Note that there is no endpoint or other mechanism to trigger a sync on the mirror

              fdoherty@atlassian.com Frank Doherty
              fdoherty@atlassian.com Frank Doherty
              Affected customers:
              0 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: